SimGrid
3.16
Versatile Simulation of Distributed Systems
|
#include "src/internal_config.h"
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include "mmprivate.h"
#include "xbt/ex.h"
#include "src/xbt_modinter.h"
Macros | |
#define | SEEK_SET 0 |
#define | HEAP_OFFSET (128UL<<20) |
Functions | |
xbt_mheap_t | xbt_mheap_new (int fd, void *baseaddr) |
xbt_mheap_t | xbt_mheap_new_options (int fd, void *baseaddr, int options) |
void | xbt_mheap_destroy_no_free (xbt_mheap_t md) |
Terminate access to a mmalloc managed region, but do not free its content. More... | |
void * | xbt_mheap_destroy (xbt_mheap_t mdp) |
Terminate access to a mmalloc managed region by unmapping all memory pages associated with the region, and closing the file descriptor if it is one that we opened. More... | |
xbt_mheap_t | mmalloc_get_default_md (void) |
static void | mmalloc_fork_prepare (void) |
static void | mmalloc_fork_parent (void) |
static void | mmalloc_fork_child (void) |
void * | mmalloc_preinit (void) |
void | mmalloc_postexit (void) |
size_t | mmalloc_get_bytes_used_remote (size_t heaplimit, const malloc_info *heapinfo) |
size_t | mmalloc_get_bytes_used (const xbt_mheap_t heap) |
ssize_t | mmalloc_get_busy_size (xbt_mheap_t heap, void *ptr) |
void | mmcheck (xbt_mheap_t heap) |
#define SEEK_SET 0 |
#define HEAP_OFFSET (128UL<<20) |
xbt_mheap_t xbt_mheap_new | ( | int | fd, |
void * | baseaddr | ||
) |
xbt_mheap_t xbt_mheap_new_options | ( | int | fd, |
void * | baseaddr, | ||
int | options | ||
) |
void xbt_mheap_destroy_no_free | ( | xbt_mheap_t | md | ) |
Terminate access to a mmalloc managed region, but do not free its content.
This is for example useful for the base region where ldl stores its data because it leaves the place after us.
void* xbt_mheap_destroy | ( | xbt_mheap_t | mdp | ) |
Terminate access to a mmalloc managed region by unmapping all memory pages associated with the region, and closing the file descriptor if it is one that we opened.
Returns NULL on success.
Returns the malloc descriptor on failure, which can subsequently be used for further action, such as obtaining more information about the nature of the failure.
Note that the malloc descriptor that we are using is currently located in region we are about to unmap, so we first make a local copy of it on the stack and use the copy.
xbt_mheap_t mmalloc_get_default_md | ( | void | ) |
size_t mmalloc_get_bytes_used_remote | ( | size_t | heaplimit, |
const malloc_info * | heapinfo | ||
) |
size_t mmalloc_get_bytes_used | ( | const xbt_mheap_t | heap | ) |
ssize_t mmalloc_get_busy_size | ( | xbt_mheap_t | heap, |
void * | ptr | ||
) |
void mmcheck | ( | xbt_mheap_t | heap | ) |