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

Memory Manager main header. More...

#include <stdlib.h>
#include <sys/mman.h>
#include <pthread.h>
#include <core/core.h>
#include <arch/atomic.h>
#include <mm/dymelor.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.

Data Structures

struct  segment
 
struct  buddy
 
struct  slab_header
 
struct  slab_chain
 
struct  memory_map
 

Macros

#define PAGE_SIZE
 
#define PER_LP_PREALLOCATED_MEMORY   (262144L * PAGE_SIZE)
 
#define BUDDY_GRANULARITY   PAGE_SIZE
 

Functions

bool allocator_init (void)
 
void allocator_fini (void)
 
void segment_init (void)
 
struct segmentget_segment (GID_t i)
 
void * get_base_pointer (GID_t gid)
 
void initialize_memory_map (struct lp_struct *lp)
 
void finalize_memory_map (struct lp_struct *lp)
 
struct buddybuddy_new (struct lp_struct *, unsigned long num_of_fragments)
 
void buddy_destroy (struct buddy *)
 
struct slab_chainslab_init (const size_t itemsize)
 
void * slab_alloc (struct slab_chain *const sch)
 
void slab_free (struct slab_chain *const sch, const void *const addr)
 

Variables

size_t __page_size
 

Detailed Description

Memory Manager main header.

Memory Manager main header

This file is part of ROOT-Sim (ROme OpTimistic Simulator).

ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.

ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Author
Alessandro Pellegrini
Francesco Quaglia

Definition in file mm.h.

Macro Definition Documentation

#define PAGE_SIZE
Value:
({ \
if(unlikely(__page_size == 0))\
__page_size = getpagesize();\
__page_size;\
})
#define unlikely(exp)
Optimize the branch as likely not taken.
Definition: core.h:74

Definition at line 51 of file mm.h.