linux - Memory allocation by threads in c -


how reduce memory used threads in c? although thread takes 8 10 mb of memory, there way reduce memory?

yes can set size of thread stack.

pthread_attr_t attribute; pthread_t thread; pthread_attr_init(&attribute); pthread_attr_setstacksize(&attribute,size); // size may defined u 1024,2048,etc pthread_create(&thread,&attribute,fun,0); 

................................................

void *fun(void *arg) {       .... } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -