Lines Matching refs:mc
91 DRD_Chunk* mc; in DRD_() local
102 mc = VG_(malloc)("drd.malloc_wrappers.cDC.1", sizeof(DRD_Chunk)); in DRD_()
103 mc->data = p; in DRD_()
104 mc->size = size; in DRD_()
105 mc->where = VG_(record_ExeContext)(tid, 0); in DRD_()
106 VG_(HT_add_node)(s_malloc_list, mc); in DRD_()
124 DRD_Chunk* mc; in DRD_() local
130 mc = VG_(HT_lookup)(s_malloc_list, (UWord)p); in DRD_()
131 if (mc) in DRD_()
133 tl_assert(p == mc->data); in DRD_()
134 if (mc->size > 0) in DRD_()
135 s_stop_using_mem_callback(mc->data, mc->size); in DRD_()
139 VG_(free)(mc); in DRD_()
180 DRD_Chunk* mc; in drd_realloc() local
197 mc = VG_(HT_lookup)(s_malloc_list, (UWord)p_old); in drd_realloc()
198 if (mc == NULL) in drd_realloc()
204 old_size = mc->size; in drd_realloc()
209 mc->where = VG_(record_ExeContext)(tid, 0); in drd_realloc()
215 s_stop_using_mem_callback(mc->data + new_size, old_size - new_size); in drd_realloc()
216 mc->size = new_size; in drd_realloc()
217 mc->where = VG_(record_ExeContext)(tid, 0); in drd_realloc()
228 VG_(memcpy)(p_new, p_old, mc->size); in drd_realloc()
231 if (mc->size > 0) in drd_realloc()
232 s_stop_using_mem_callback(mc->data, mc->size); in drd_realloc()
237 mc->data = (Addr)p_new; in drd_realloc()
238 mc->size = new_size; in drd_realloc()
239 mc->where = VG_(record_ExeContext)(tid, 0); in drd_realloc()
240 VG_(HT_add_node)(s_malloc_list, mc); in drd_realloc()
284 DRD_Chunk* mc; in drd_malloc_usable_size() local
286 mc = VG_(HT_lookup)(s_malloc_list, (UWord)p); in drd_malloc_usable_size()
288 return mc ? mc->size : 0; in drd_malloc_usable_size()
320 DRD_Chunk* mc; in DRD_() local
327 while ((mc = VG_(HT_Next)(s_malloc_list))) in DRD_()
329 if (mc->data <= a && a < mc->data + mc->size) in DRD_()
331 *data = mc->data; in DRD_()
332 *size = mc->size; in DRD_()
333 *where = mc->where; in DRD_()
346 DRD_Chunk* mc; in DRD_() local
357 while ((mc = VG_(HT_Next)(s_malloc_list))) in DRD_()
360 nbytes += mc->size; in DRD_()