mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Implement missing heap-intercept function "dh_malloc_usable_size".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14721
This commit is contained in:
parent
04b8584502
commit
258b4a6bc9
@ -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 ---//
|
||||
//------------------------------------------------------------//
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user