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? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -