Threaded 6.4 code compiled under 9.0 uses a lot more memory?..
Jan Mikkelsen
janm at transactionware.com
Tue Oct 30 12:06:30 UTC 2012
Hi,
On 30/10/2012, at 10:12 PM, Karl Pielorz <kpielorz_lst at 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.
More information about the freebsd-hackers
mailing list