How to calculate the stack size for a thread/worker_thread?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

I'd like to know how to calculate the required stack size for a thread/worker_thread.

Also is there any method to know current memory usage? ( for debug memory leak )

BTW, the comment in http_server.c says /* printf requires 4K of stack */

is this true?

Doe that mean we should avoid using printf/sprintf in a thread/worker thread

if the stak size is less than 4K. (My test shows it seems ok to print someting even

the stack size is just 2K)

Thanks.

0 Likes
1 Reply