]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove two malloc/free arenas:
authorNicholas Nethercote <njn@valgrind.org>
Sun, 13 Mar 2005 18:11:44 +0000 (18:11 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sun, 13 Mar 2005 18:11:44 +0000 (18:11 +0000)
- JITTER, which was unused, since Vex now manages its own memory
- TRANSIENT, which was barely being used;  I replaced it with usage of CORE

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3342

coregrind/core.h
coregrind/vg_malloc2.c
coregrind/vg_syscalls.c

index fc0ba65dc18a7bdbe69e4cc641d4b8deb6c7e7f6..195156507940c6ad837152cd081bb1deaea638fa 100644 (file)
@@ -353,29 +353,25 @@ void VG_(sanity_check_needs)(void);
       CORE      for the core's general use.
       TOOL      for the tool to use (and the only one it uses).
       SYMTAB    for Valgrind's symbol table storage.
-      JITTER    for small storage during translation.
       CLIENT    for the client's mallocs/frees, if the tool replaces glibc's
                     malloc() et al -- redzone size is chosen by the tool.
       DEMANGLE  for the C++ demangler.
       EXECTXT   for storing ExeContexts.
       ERRORS    for storing CoreErrors.
-      TRANSIENT for very short-term use.  It should be empty in between uses.
 
    When adding a new arena, remember also to add it to ensure_mm_init(). 
 */
 typedef Int ArenaId;
 
-#define VG_N_ARENAS        
+#define VG_N_ARENAS        7
 
 #define VG_AR_CORE         0
 #define VG_AR_TOOL         1
 #define VG_AR_SYMTAB       2
-#define VG_AR_JITTER       3
-#define VG_AR_CLIENT       4
-#define VG_AR_DEMANGLE     5
-#define VG_AR_EXECTXT      6
-#define VG_AR_ERRORS       7
-#define VG_AR_TRANSIENT    8
+#define VG_AR_CLIENT       3
+#define VG_AR_DEMANGLE     4
+#define VG_AR_EXECTXT      5
+#define VG_AR_ERRORS       6
 
 // This is both the minimum payload size of a malloc'd block, and its
 // minimum alignment.  Must be a power of 2 greater than 4, and should be
index f0314162aef836dec24f957732d31c135af1b27a..75f5472e66644d37bc2766073357f09b44bce528 100644 (file)
@@ -415,12 +415,10 @@ void ensure_mm_init ( void )
    arena_init ( VG_AR_CORE,      "core",     4, CORE_ARENA_MIN_SZB );
    arena_init ( VG_AR_TOOL,      "tool",     4,            1048576 );
    arena_init ( VG_AR_SYMTAB,    "symtab",   4,            1048576 );
-   arena_init ( VG_AR_JITTER,    "JITter",   4,              32768 );
    arena_init ( VG_AR_CLIENT,    "client",  client_rz_szB, 1048576 );
    arena_init ( VG_AR_DEMANGLE,  "demangle", 12/*paranoid*/, 65536 );
    arena_init ( VG_AR_EXECTXT,   "exectxt",  4,              65536 );
    arena_init ( VG_AR_ERRORS,    "errors",   4,              65536 );
-   arena_init ( VG_AR_TRANSIENT, "transien", 4,              65536 );
 
    init_done = True;
 #  ifdef DEBUG_MALLOC
index 9c24a5be847671907c9e58e0054b954bc70ea1a2..d8a7426b9a084c8162b1bf117343c8b533d13162 100644 (file)
@@ -677,19 +677,19 @@ static
 void pre_mem_read_sendmsg ( ThreadId tid,
                             Char *msg, Addr base, SizeT size )
 {
-   Char *outmsg = strdupcat ( "socketcall.sendmsg", msg, VG_AR_TRANSIENT );
+   Char *outmsg = strdupcat ( "socketcall.sendmsg", msg, VG_AR_CORE );
    PRE_MEM_READ( outmsg, base, size );
 
-   VG_(arena_free) ( VG_AR_TRANSIENT, outmsg );
+   VG_(arena_free) ( VG_AR_CORE, outmsg );
 }
 
 static 
 void pre_mem_write_recvmsg ( ThreadId tid,
                              Char *msg, Addr base, SizeT size )
 {
-   Char *outmsg = strdupcat ( "socketcall.recvmsg", msg, VG_AR_TRANSIENT );
+   Char *outmsg = strdupcat ( "socketcall.recvmsg", msg, VG_AR_CORE );
    PRE_MEM_WRITE( outmsg, base, size );
-   VG_(arena_free) ( VG_AR_TRANSIENT, outmsg );
+   VG_(arena_free) ( VG_AR_CORE, outmsg );
 }
 
 static
@@ -769,7 +769,7 @@ void pre_mem_read_sockaddr ( ThreadId tid,
    /* NULL/zero-length sockaddrs are legal */
    if ( sa == NULL || salen == 0 ) return;
 
-   outmsg = VG_(arena_malloc) ( VG_AR_TRANSIENT,
+   outmsg = VG_(arena_malloc) ( VG_AR_CORE,
                                 VG_(strlen)( description ) + 30 );
 
    VG_(sprintf) ( outmsg, description, ".sa_family" );
@@ -819,7 +819,7 @@ void pre_mem_read_sockaddr ( ThreadId tid,
          break;
    }
    
-   VG_(arena_free) ( VG_AR_TRANSIENT, outmsg );
+   VG_(arena_free) ( VG_AR_CORE, outmsg );
 }
 
 /* Dereference a pointer to a UInt. */