|
From: <sv...@va...> - 2005-08-24 23:08:53
|
Author: dirk
Date: 2005-08-25 00:08:49 +0100 (Thu, 25 Aug 2005)
New Revision: 4509
Log:
svn merge 4492: Fix massif
Added:
branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.c
branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.stderr.exp
branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.vgtest
Modified:
branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c
branches/VALGRIND_3_0_BRANCH/massif/tests/Makefile.am
Modified: branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c 2005-08-24 23:0=
8:24 UTC (rev 4508)
+++ branches/VALGRIND_3_0_BRANCH/coregrind/m_mallocfree.c 2005-08-24 23:0=
8:49 UTC (rev 4509)
@@ -59,9 +59,9 @@
/* Layout of an in-use block:
=20
this block total szB (sizeof(SizeT) bytes)
- red zone bytes (depends on Arena.rz_szB, but > sizeof(vo=
id*))
+ red zone bytes (depends on Arena.rz_szB, but >=3D sizeof=
(void*))
(payload bytes)
- red zone bytes (depends on Arena.rz_szB, but > sizeof(vo=
id*))
+ red zone bytes (depends on Arena.rz_szB, but >=3D sizeof=
(void*))
this block total szB (sizeof(SizeT) bytes)
=20
Layout of a block on the free list:
@@ -378,7 +378,12 @@
SizeT i;
Arena* a =3D arenaId_to_ArenaP(aid);
=20
- vg_assert(rz_szB < 128); // ensure reasonable size
+ // Ensure redzones are a reasonable size. They must always be at lea=
st
+ // the size of a pointer, for holding the prev/next pointer (see the =
layout
+ // details at the top of this file).
+ vg_assert(rz_szB < 128);
+ if (rz_szB < sizeof(void*)) rz_szB =3D sizeof(void*);
+ =20
vg_assert((min_sblock_szB % VKI_PAGE_SIZE) =3D=3D 0);
a->name =3D name;
a->clientmem =3D ( VG_AR_CLIENT =3D=3D aid ? True : False );
Modified: branches/VALGRIND_3_0_BRANCH/massif/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_0_BRANCH/massif/tests/Makefile.am 2005-08-24 23:0=
8:24 UTC (rev 4508)
+++ branches/VALGRIND_3_0_BRANCH/massif/tests/Makefile.am 2005-08-24 23:0=
8:49 UTC (rev 4509)
@@ -1,7 +1,13 @@
noinst_SCRIPTS =3D filter_stderr
=20
EXTRA_DIST =3D $(noinst_SCRIPTS) \
+ basic_malloc.stderr.exp basic_malloc.vgtest \
toobig-allocs.stderr.exp toobig-allocs.vgtest \
true_html.stderr.exp true_html.vgtest \
true_text.stderr.exp true_text.vgtest
=20
+AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g=20
+
+check_PROGRAMS =3D \
+ basic_malloc
+
Copied: branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.c (from re=
v 4492, trunk/massif/tests/basic_malloc.c)
Copied: branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.stderr.exp=
(from rev 4492, trunk/massif/tests/basic_malloc.stderr.exp)
Copied: branches/VALGRIND_3_0_BRANCH/massif/tests/basic_malloc.vgtest (fr=
om rev 4492, trunk/massif/tests/basic_malloc.vgtest)
|