Hi,

On 30/10/2012, at 10:12 PM, Karl Pielorz <kpielorz_...@tdx.co.uk> wrote:

> 
> Hi All,
> 
> Can anyone think of any quick pointers as to why some code originally written 
> under 6.4 amd64 - when re-compiled under 9.0-stable amd64 takes up a *lot* 
> more memory when running?
> 
> The code involved is a sendmail Milter, and a TCP server type program (that 
> runs up a large number of threads [~700] at startup).
> 
> Both were previously compiled with:
> 
> -O2 -pthread -lc_r
> 
> They're now compiled under 9.0-S with just:
> 
> -O2 -pthread

libc_r is a user mode implementation of pthreads, so there is one actual kernel 
thread with a stack. You now have ~700 kernel threads on startup. Per-thread 
stack allocation will be different, and you could quite easily explain 
differences that way.

Regards,

Jan.

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to