extern void* VG_(arena_calloc) ( ArenaId arena,
SizeT nmemb, SizeT bytes_per_memb );
extern void* VG_(arena_realloc) ( ArenaId arena, void* ptr, SizeT size );
-extern void* VG_(arena_malloc_aligned) ( ArenaId aid, SizeT req_alignB,
- SizeT req_pszB );
extern SizeT VG_(arena_payload_szB) ( ArenaId aid, void* payload );
. . . . . . .
*/
-void* VG_(arena_malloc_aligned) ( ArenaId aid, SizeT req_alignB, SizeT req_pszB )
+static
+void* arena_malloc_aligned ( ArenaId aid, SizeT req_alignB, SizeT req_pszB )
{
SizeT base_pszB_req, base_pszB_act, frag_bszB;
Block *base_b, *align_b;
if (req_alignB < VG_MIN_MALLOC_SZB
|| req_alignB > 1048576
|| VG_(log2)( VG_(clo_alignment) ) == -1 /* not a power of 2 */) {
- VG_(printf)("VG_(arena_malloc_aligned)(%p, %d, %d)\nbad alignment",
+ VG_(printf)("arena_malloc_aligned(%p, %d, %d)\nbad alignment",
a, req_alignB, req_pszB );
- VG_(core_panic)("VG_(arena_malloc_aligned)");
+ VG_(core_panic)("arena_malloc_aligned");
/*NOTREACHED*/
}
// Paranoid
return VG_(arena_realloc) ( VG_AR_TOOL, ptr, size );
}
-void* VG_(malloc_aligned) ( SizeT req_alignB, SizeT req_pszB )
-{
- return VG_(arena_malloc_aligned) ( VG_AR_TOOL, req_alignB, req_pszB );
-}
-
-
void* VG_(cli_malloc) ( SizeT align, SizeT nbytes )
{
- // 'align' should be valid by now. VG_(arena_malloc_aligned)() will
+ // 'align' should be valid by now. arena_malloc_aligned() will
// abort if it's not.
if (VG_MIN_MALLOC_SZB == align)
- return VG_(arena_malloc) ( VG_AR_CLIENT, nbytes );
+ return VG_(arena_malloc) ( VG_AR_CLIENT, nbytes );
else
- return VG_(arena_malloc_aligned) ( VG_AR_CLIENT, align, nbytes );
+ return arena_malloc_aligned ( VG_AR_CLIENT, align, nbytes );
}
void VG_(cli_free) ( void* p )
extern void VG_(free) ( void* p );
extern void* VG_(calloc) ( SizeT n, SizeT bytes_per_elem );
extern void* VG_(realloc) ( void* p, SizeT size );
-extern void* VG_(malloc_aligned) ( SizeT align_bytes, SizeT nbytes );
/* terminate everything */
extern void VG_(exit)( Int status )