The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
mm.h File Reference

Memory Manager main header. More...

#include <log/log.h>
#include <stddef.h>
#include <stdlib.h>
+ Include dependency graph for mm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * mm_alloc (size_t mem_size)
 A version of the stdlib malloc() used internally. More...
 
void * mm_realloc (void *ptr, size_t mem_size)
 A version of the stdlib realloc() used internally. More...
 
void mm_free (void *ptr)
 A version of the stdlib free() used internally. More...
 

Detailed Description

Memory Manager main header.

Memory Manager main header

Definition in file mm.h.

Function Documentation

◆ mm_alloc()

void* mm_alloc ( size_t  mem_size)
inline

A version of the stdlib malloc() used internally.

Parameters
mem_sizethe size of the requested memory allocation
Returns
a pointer to the newly allocated memory area

In case of memory allocation failure, a log message is taken and the simulation is promptly aborted

Definition at line 26 of file mm.h.

+ Here is the caller graph for this function:

◆ mm_free()

void mm_free ( void *  ptr)
inline

A version of the stdlib free() used internally.

Parameters
ptra pointer to the memory area to free

Definition at line 61 of file mm.h.

+ Here is the caller graph for this function:

◆ mm_realloc()

void* mm_realloc ( void *  ptr,
size_t  mem_size 
)
inline

A version of the stdlib realloc() used internally.

Parameters
ptra pointer to the memory area to reallocate
mem_sizethe new size of the memory allocation
Returns
a pointer to the newly allocated memory area

In case of memory allocation failure, a log message is taken and the simulation is promptly aborted

Definition at line 46 of file mm.h.