SiReNe Simulation Software  1.0
Memory.h File Reference

Memory management functions. More...

#include "Sirene.h"
Include dependency graph for Memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SynapseModel ** SynapseModelsAlloc (int NbModels)
 Memory allocation of synapse models. More...
 
void MemoryRelease (Simul *)
 Memory de-allocation of all dynamic variables used in the simulation. More...
 
void * MYMALLOC (size_t Size)
 Inline allocation function with profiling of memory consumption. More...
 
void MYFREE (void *Ptr)
 Inline free function with profiling of memory consumption. More...
 
void DISPLAYMEM ()
 Memory consumption report. More...
 

Variables

unsigned long MEMORY
 Total amount of requested memory. More...
 
unsigned long ALLOCATED
 Total amount of actually allocated memory. More...
 
unsigned long FREED
 Total amount of de-allocated memory. More...
 

Function Documentation

◆ DISPLAYMEM()

void DISPLAYMEM ( )
inline

References ALLOCATED, FREED, and MEMORY.

Referenced by main().

◆ MemoryRelease()

◆ MYFREE()

void MYFREE ( void *  Ptr)
inline

Parameters
PtrPointer to deallocate

References FREED.

Referenced by Advance(), and MemoryRelease().

◆ MYMALLOC()

void* MYMALLOC ( size_t  Size)
inline

Parameters
SizeNumber of bytes to allocate
Returns
A pointer to the newly allocated memory

References ALLOCATED, and MEMORY.

Referenced by Advance(), main(), PrepareSimu(), and SynapseModelsAlloc().

◆ SynapseModelsAlloc()

SynapseModel** SynapseModelsAlloc ( int  NbModels)

Parameters
NbModelsNumbers of neural models
Returns
A pointer to the newly allocated 2D array

References MYMALLOC().

Referenced by main().

Variable Documentation

◆ ALLOCATED

unsigned long ALLOCATED

Referenced by DISPLAYMEM(), and MYMALLOC().

◆ FREED

unsigned long FREED

Referenced by DISPLAYMEM(), and MYFREE().

◆ MEMORY

unsigned long MEMORY

Referenced by DISPLAYMEM(), and MYMALLOC().