SimGrid
3.16
Versatile Simulation of Distributed Systems
|
Descriptor of a mmalloc area.
Internal structure that defines the format of the malloc-descriptor. This gets written to the base address of the region that mmalloc is managing, and thus also becomes the file header for the mapped file, if such a file exists.
#include <mmprivate.h>
Public Attributes | |
pthread_mutex_t | mutex |
Mutex locking the access to the heap. More... | |
unsigned int | refcount |
Number of processes that attached the heap. More... | |
struct mdesc * | next_mdesc |
Chained lists of mdescs. More... | |
char | magic [MMALLOC_MAGIC_SIZE] |
The "magic number" for an mmalloc file. More... | |
unsigned int | headersize |
The size in bytes of this structure. More... | |
unsigned char | version |
Version number of the mmalloc package that created this file. More... | |
unsigned int | options |
unsigned int | flags |
Some flag bits to keep track of various internal things. More... | |
size_t | heapsize |
Number of info entries. More... | |
void * | heapbase |
Pointer to first block of the heap (base of the first block). More... | |
size_t | heapindex |
Current search index for the heap table. More... | |
size_t | heaplimit |
Limit of valid info table indices. More... | |
malloc_info * | heapinfo |
Block information table. More... | |
s_xbt_swag_t | fraghead [BLOCKLOG] |
void * | base |
void * | breakval |
End of memory in use. More... | |
void * | top |
End of the current memory region for this malloc heap. More... | |
int | fd |
Open file descriptor for the file to which this malloc heap is mapped. More... | |
struct mstats | heapstats |
pthread_mutex_t mdesc::mutex |
Mutex locking the access to the heap.
unsigned int mdesc::refcount |
Number of processes that attached the heap.
struct mdesc* mdesc::next_mdesc |
Chained lists of mdescs.
char mdesc::magic[MMALLOC_MAGIC_SIZE] |
The "magic number" for an mmalloc file.
unsigned int mdesc::headersize |
The size in bytes of this structure.
Used as a sanity check when reusing a previously created mapped file.
unsigned char mdesc::version |
Version number of the mmalloc package that created this file.
unsigned int mdesc::options |
unsigned int mdesc::flags |
Some flag bits to keep track of various internal things.
size_t mdesc::heapsize |
Number of info entries.
void* mdesc::heapbase |
Pointer to first block of the heap (base of the first block).
size_t mdesc::heapindex |
Current search index for the heap table.
Search index in the info table.
size_t mdesc::heaplimit |
Limit of valid info table indices.
malloc_info* mdesc::heapinfo |
Block information table.
Table indexed by block number giving per-block information.
s_xbt_swag_t mdesc::fraghead[BLOCKLOG] |
void* mdesc::base |
void* mdesc::breakval |
End of memory in use.
Some memory might be already mapped by the OS but not used by the heap.
void* mdesc::top |
End of the current memory region for this malloc heap.
This is the first location past the end of mapped memory.
Compared to breakval, this value is rounded to the next memory page.
int mdesc::fd |
Open file descriptor for the file to which this malloc heap is mapped.
If this value is negative, MAP_ANONYMOUS memory is used.
Also note that it may change each time the region is mapped and unmapped.
struct mstats mdesc::heapstats |