assert(!MC_process_is_self(process));
// Read/dereference/refresh the std_heap pointer:
if (!process->heap) {
- xbt_mheap_t oldheap = mmalloc_get_current_heap();
- MC_SET_MC_HEAP;
+ xbt_mheap_t oldheap = mmalloc_set_current_heap(mc_heap);
process->heap = malloc(sizeof(struct mdesc));
mmalloc_set_current_heap(oldheap);
}
// Refresh process->heapinfo:
size_t malloc_info_bytesize = process->heap->heaplimit * sizeof(malloc_info);
- xbt_mheap_t oldheap = mmalloc_get_current_heap();
- MC_SET_MC_HEAP;
+ xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
process->heap_info = (malloc_info*) realloc(process->heap_info,
malloc_info_bytesize);
- mmalloc_set_current_heap(oldheap);
+ mmalloc_set_current_heap(heap);
MC_process_read(process, MC_ADDRESS_SPACE_READ_FLAGS_NONE,
process->heap_info,