This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Malloc improvements


Hi DJ,

> Hmmm... not sure why that test case is worse in my branch, the whole
> point of my work is to add a lockless fast path.  I'll have to
> investigate that some more.  Conveniently, I have a trace feature in
> there that I'm also working on ;-)

I took a look at this, and malloc(8) is trying to grab from tc_idx 2,
but free() is returning it to tc_idx 3.

Inside malloc(), size2tidx() rounds the request up to 32 bytes, but in
free() size is 48 bytes, size-SIZE_SZ is 40, and this causes us to
return it to tc_idx 3. Did we add 16B of padding instead of 8?

Anton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]