Minor mods to stop make the leak detector behave properly for the
following kind of stupid test program
int main (void) { char* a = malloc(100); return 0; }
which many people seem fond of trying for some reason.
In general the leak detector works fine.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@387 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_malloc2.c b/coregrind/vg_malloc2.c
index ab87bdb..87f580d 100644
--- a/coregrind/vg_malloc2.c
+++ b/coregrind/vg_malloc2.c
@@ -233,7 +233,8 @@
cszW += 2; /* Take into account sb->next and sb->n_words fields */
if (cszW < a->min_sblockW) cszW = a->min_sblockW;
while ((cszW % VKI_WORDS_PER_PAGE) > 0) cszW++;
- sb = VG_(get_memory_from_mmap) ( cszW * sizeof(Word) );
+ sb = VG_(get_memory_from_mmap) ( cszW * sizeof(Word),
+ "newSuperblock" );
sb->n_payload_words = cszW - 2;
a->bytes_mmaped += cszW * sizeof(Word);
if (0)