#include <memory>
#include <utility>
-#include <xbt/asserts.h>
-#include <xbt/sysdep.h>
+#include "xbt/asserts.h"
+#include "xbt/sysdep.h"
#include "src/internal_config.h"
#include "src/smpi/private.h"
size_t n = snapshot->snapshot_regions.size();
for (size_t i = 0; i != n; ++i) {
mc_mem_region_t region = snapshot->snapshot_regions[i].get();
- if (!(region && region->contain(simgrid::mc::remote(addr))))
+ if (not(region && region->contain(simgrid::mc::remote(addr))))
continue;
if (region->storage_type() == simgrid::mc::StorageType::Privatized) {
res = 0;
else
res = memcmp(buffer1, buffer2, size);
- if (!stack_alloc) {
+ if (not stack_alloc) {
free(buffer1a);
free(buffer2a);
}
namespace simgrid {
namespace mc {
-Snapshot::Snapshot(Process* process, int _num_state)
+Snapshot::Snapshot(RemoteClient* process, int _num_state)
: AddressSpace(process)
, num_state(_num_state)
, heap_bytes_used(0)
}
-Snapshot::~Snapshot()
-{
-
-}
-
const void* Snapshot::read_bytes(void* buffer, std::size_t size,
RemotePtr<void> address, int process_index,
ReadOptions options) const
xbt_assert(xbt_pagesize == getpagesize());
xbt_assert(1 << xbt_pagebits == xbt_pagesize);
- std::unique_ptr<simgrid::mc::Process> process(new simgrid::mc::Process(getpid(), -1));
+ std::unique_ptr<simgrid::mc::RemoteClient> process(new simgrid::mc::RemoteClient(getpid(), -1));
process->init();
mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process));
xbt_test_add("Reading whole region data for %i page(s)", n);
const void* read = MC_region_read(®ion, destination, source, byte_size);
- xbt_test_assert(!memcmp(source, read, byte_size), "Mismatch in MC_region_read()");
+ xbt_test_assert(not memcmp(source, read, byte_size), "Mismatch in MC_region_read()");
xbt_test_add("Reading parts of region data for %i page(s)", n);
for(int j=0; j!=100; ++j) {
size_t offset = rand() % byte_size;
size_t size = rand() % (byte_size - offset);
const void* read = MC_region_read(®ion, destination, (const char*) source+offset, size);
- xbt_test_assert(!memcmp((char*) source+offset, read, size),
- "Mismatch in MC_region_read()");
+ xbt_test_assert(not memcmp((char*)source + offset, read, size), "Mismatch in MC_region_read()");
}
xbt_test_add("Compare whole region data for %i page(s)", n);
for(int j=0; j!=100; ++j) {
size_t offset = rand() % byte_size;
size_t size = rand() % (byte_size - offset);
- xbt_test_assert(!MC_snapshot_region_memcmp((char*) source+offset, ®ion, (char*) source+offset, ®ion, size),
- "Mismatch in MC_snapshot_region_memcmp()");
+ xbt_test_assert(
+ not MC_snapshot_region_memcmp((char*)source + offset, ®ion, (char*)source + offset, ®ion, size),
+ "Mismatch in MC_snapshot_region_memcmp()");
}
if (n==1) {