]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't force tool redzones to be multiples of 8.
authorNicholas Nethercote <n.nethercote@gmail.com>
Sat, 10 Jul 2004 16:01:52 +0000 (16:01 +0000)
committerNicholas Nethercote <n.nethercote@gmail.com>
Sat, 10 Jul 2004 16:01:52 +0000 (16:01 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2463

coregrind/vg_default.c
coregrind/vg_malloc2.c
helgrind/hg_main.c

index bdc9e1ffe7a600ca91fa091b6c1fb4a262942e71..caa540ea4054cb7482b9e2f05673404bd5f0f773 100644 (file)
@@ -66,9 +66,9 @@ void malloc_panic ( const Char* fn )
 /*--- Replacing malloc et al                               ---*/
 /*------------------------------------------------------------*/
 
-/* Default redzone for CLIENT arena of Valgrind's malloc() is 4 bytes */
+/* Default redzone size for CLIENT arena of Valgrind's malloc() */
 __attribute__ ((weak))
-UInt VG_(vg_malloc_redzone_szB) = 4;
+UInt VG_(vg_malloc_redzone_szB) = 8;
 
 Bool VG_(sk_malloc_called_by_scheduler) = False;
 
index b3a3d33b23ac119bdb056cf248539cef6b97f0cb..c21f3eb525d751d7b08fafbe79453661db01c735 100644 (file)
@@ -251,7 +251,7 @@ void ensure_mm_init ( void )
    
    if (init_done) return;
 
-   /* Use a checked red zone size of 1 word for our internal stuff,
+   /* Use checked red zones (of various sizes) for our internal stuff,
       and an unchecked zone of arbitrary size for the client.  Of
       course the client's red zone can be checked by the tool, eg. 
       by using addressibility maps, but not by the mechanism implemented
@@ -270,7 +270,6 @@ void ensure_mm_init ( void )
    sk_assert(VG_(vg_malloc_redzone_szB) < 128);
    sk_assert(VG_(vg_malloc_redzone_szB) >= 0);
    client_rz_szW = VG_(vg_malloc_redzone_szB)/4;
-   if (client_rz_szW % 2 == 1) client_rz_szW++;
 
    arena_init ( &vg_arena[VG_AR_CLIENT],    "client",  
                client_rz_szW, False, 262144, True );
index a765a787907f5e4d1f0d59b73d77a9b9b6028960..30017a433337b18fdccb7ba46787e79d42cfb859 100644 (file)
@@ -1808,7 +1808,7 @@ static Int freechunkptr = 0;
 static HG_Chunk *freechunks[N_FREED_CHUNKS];
 
 /* Use a small redzone (paranoia) */
-UInt VG_(vg_malloc_redzone_szB) = 4;
+UInt VG_(vg_malloc_redzone_szB) = 8;
 
 
 /* Allocate a user-chunk of size bytes.  Also allocate its shadow