Malloc improvements
Anton Blanchard
anton@au1.ibm.com
Wed Jul 13 08:58:00 GMT 2016
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
More information about the Libc-alpha
mailing list