/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "internal_config.h"
-#include "mc_object_info.h"
-#include "mc_private.h"
-#include "smpi/private.h"
-#include "mc/mc_snapshot.h"
-#include "mc_ignore.h"
-#include "mc_protocol.h"
-#include "mc_client.h"
+#include "src/internal_config.h"
+#include "src/mc/mc_object_info.h"
+#include "src/mc/mc_private.h"
+#include "src/smpi/private.h"
+#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_ignore.h"
+#include "src/mc/mc_protocol.h"
+#include "src/mc/mc_client.h"
extern "C" {
xbt_mheap_t heap = mmalloc_get_current_heap();
- s_mc_heap_ignore_region_t region;
- memset(®ion, 0, sizeof(region));
- region.address = address;
- region.size = size;
- region.block =
+ s_mc_ignore_heap_message_t message;
+ message.type = MC_MESSAGE_IGNORE_HEAP;
+ message.address = address;
+ message.size = size;
+ message.block =
((char *) address -
(char *) heap->heapbase) / BLOCKSIZE + 1;
- if (heap->heapinfo[region.block].type == 0) {
- region.fragment = -1;
- heap->heapinfo[region.block].busy_block.ignore++;
+ if (heap->heapinfo[message.block].type == 0) {
+ message.fragment = -1;
+ heap->heapinfo[message.block].busy_block.ignore++;
} else {
- region.fragment =
+ message.fragment =
((uintptr_t) (ADDR2UINT(address) % (BLOCKSIZE))) >>
- heap->heapinfo[region.block].type;
- heap->heapinfo[region.block].busy_frag.ignore[region.fragment]++;
+ heap->heapinfo[message.block].type;
+ heap->heapinfo[message.block].busy_frag.ignore[message.fragment]++;
}
- s_mc_ignore_heap_message_t message;
- message.type = MC_MESSAGE_IGNORE_HEAP;
- message.region = region;
if (MC_protocol_send(mc_client->fd, &message, sizeof(message)))
xbt_die("Could not send ignored region to MCer");
}