|
From: Nicholas N. <nj...@cs...> - 2005-05-06 15:26:47
|
On Fri, 6 May 2005, Jason Evans wrote: > If I understand correctly, this is bad (overlapping): > > [------] > [-------] > > And this is bad (nested): > > [----------] > [----] > > But this is the scenario that is causing me trouble (adjacent): > > [------I------] > > The lc_shadows assertion requires there to be a gap of at least one byte > between allocations; merely being non-overlapping isn't good enough to > avoid triggering the assertion: > > [------] [------] > > Is it in fact important to valgrind that there be gaps between allocations? Off the top of my head, I'd guess no, and that the lc_shadows assertion is too restrictive. (I don't know about the lc_markstack assertion, that might be a bug.) One downside of such allocations is that if your allocator doesn't have any redzones or metadata between blocks, you can't detect an overrun from one block into another, because it's all considered addressable by Memcheck. N |