New libc malloc patch

Doug Rabson dfr at
Mon Dec 12 02:17:44 PST 2005

On Monday 12 December 2005 03:16, Johan Bucht wrote:
> Isn't 8 byte alignment expected by some applications?
> How do you know if a allocation is huge if you don't have a tag?
> Something more to read up on i guess. =)

Actually, I'm glad you pointed that out. My own applications use SSE2 
primitives a lot and those guys need to be allocated on 16-byte 
boundaries. I currently use phkmalloc which has the nice property that 
small allocations are aligned to the next greater power-of-2 boundary 
which is (for me) always at least 16.

Since you are targetting modern architectures with this allocator, could 
you please set the minimum alignment on all i386 and amd64 processors 
to 16. For what its worth, when gcc is using SSE instructions, it 
assumes this for all memory, stack or malloc.

More information about the freebsd-current mailing list