Implement missing heap-intercept function "dh_malloc_usable_size".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14721
This commit is contained in:
Julian Seward 2014-11-14 10:13:49 +00:00
parent 04b8584502
commit 258b4a6bc9

View File

@ -671,12 +671,11 @@ static void* dh_realloc ( ThreadId tid, void* p_old, SizeT new_szB )
static SizeT dh_malloc_usable_size ( ThreadId tid, void* p )
{
tl_assert(0);
//zz HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
//zz
//zz return ( hc ? hc->req_szB + hc->slop_szB : 0 );
Block* bk = find_Block_containing( (Addr)p );
return bk ? bk->req_szB : 0;
}
//------------------------------------------------------------//
//--- memory references ---//
//------------------------------------------------------------//