1 /* Copyright (c) 2007-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SIMGRID_MC_MEMORY_MAP_H
8 #define SIMGRID_MC_MEMORY_MAP_H
15 #include <sys/types.h>
19 #include <simgrid_config.h>
20 #include "mc_forward.hpp"
25 /** An virtual memory map entry from /proc/$pid/maps */
27 std::uint64_t start_addr, end_addr;
28 int prot; /* Memory protection */
29 int flags; /* Additional memory flags */
30 std::uint64_t offset; /* Offset in the file/whatever */
31 char dev_major; /* Major of the device */
32 char dev_minor; /* Minor of the device */
33 unsigned long inode; /* Inode in the device */
34 std::string pathname; /* Path name of the mapped file */
37 XBT_PRIVATE std::vector<VmMap> get_memory_map(pid_t pid);
44 XBT_PRIVATE void MC_find_object_address(
45 std::vector<simgrid::mc::VmMap> const& maps, simgrid::mc::ObjectInformation* result);