1 /* Copyright (c) 2007-2014. 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 MC_MEMORY_MAP_H
8 #define MC_MEMORY_MAP_H
10 #include <sys/types.h>
12 #include <simgrid_config.h>
13 #include "mc_forward.h"
18 * These functions and data structures implements a binary interface for
19 * the proc maps ascii interface */
21 /* Each field is defined as documented in proc's manual page */
24 void *start_addr; /* Start address of the map */
25 void *end_addr; /* End address of the map */
26 int prot; /* Memory protection */
27 int flags; /* Additional memory flags */
28 void *offset; /* Offset in the file/whatever */
29 char dev_major; /* Major of the device */
30 char dev_minor; /* Minor of the device */
31 unsigned long inode; /* Inode in the device */
32 char *pathname; /* Path name of the mapped file */
35 typedef struct s_map_region s_map_region_t, *map_region_t;
39 s_map_region_t *regions; /* Pointer to an array of regions */
40 int mapsize; /* Number of regions in the memory */
44 memory_map_t MC_get_memory_map(pid_t pid);
45 void MC_free_memory_map(memory_map_t map);