diff --git a/exp-dhat/dh_main.c b/exp-dhat/dh_main.c index 273038558..471c3edc6 100644 --- a/exp-dhat/dh_main.c +++ b/exp-dhat/dh_main.c @@ -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 ---// //------------------------------------------------------------//