Change glibc malloc behavior: X86 and MIPS

Daniel Jacobowitz drow@false.org
Mon Feb 11 13:22:00 GMT 2008


On Sun, Feb 10, 2008 at 06:48:45PM -0800, Bin Chen wrote:
> You can see in MIPS the three malloc() invoke three times brk() which
> a small space add so the performance is bad, but in X86 the brk() in
> first time is large enough so the succeeding malloc didn't need to
> call brk() again. So my question is how to make MIPS glibc's malloc()
> behaviour the same as in X86, need to recomplile the glibc or just a
> environment var is enough?

This should happen on all platforms.  Are the glibc versions the same?
Check M_TOP_PAD using mallopt.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Libc-alpha mailing list