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 9
+#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
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
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
/* 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" );
break;
}
- VG_(arena_free) ( VG_AR_TRANSIENT, outmsg );
+ VG_(arena_free) ( VG_AR_CORE, outmsg );
}
/* Dereference a pointer to a UInt. */