|
From: Jeremy F. <je...@go...> - 2003-11-25 08:32:11
|
On Mon, 2003-11-24 at 03:32, Nicholas Nethercote wrote: > On Mon, 24 Nov 2003, Salim SAYOURI wrote: > > > It seems that the pointers used in Judy array are aligned on 8 bytes! And > > launching valgrind with the option --alignment=8 solves the problem. > > This is a fairly common problem... perhaps we should just change > Valgrind's allocator to align heap blocks on 8-byte boundaries? I know > that programs should, strictly speaking, be able to handle 4-byte > alignments. But it does cause difficult-to-understand problems with > Memcheck. Not sure. Malloc is required to return a block which is suitably aligned for any type, which means 8 bytes on the x86 (or perhaps even 16 bytes, given that SSE instructions need 16 byte alignment). I don't think there's any problem with returning 8 byte aligned blocks. J |