Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
24 #ifndef MEMORY_ALLOCATIONS_H
25 #define MEMORY_ALLOCATIONS_H
61 #define InitAllocator() InitAmigaAllocator()
62 #define ExitAllocator() ExitAmigaAllocator()
63 #define AllocMemory(x) AllocateAmigaMemory(x)
64 #define AllocMemoryArray(x,y) AllocateAmigaZeroedArray(x,y)
65 #define ReallocMemory(x,y,z) ReallocateAmigaMemory(x,y,z)
66 #define FreeMemory(x) FreeAmigaMemory(x)
67 #define IsAllocatorThreadSafe() IsAmigaAllocatorThreadSafe()
76 #ifdef USE_TLSF_ALLOCATOR
77 #elif defined USE_NEDMALLOC_ALLOCATOR
78 #include "nedmalloc_allocator.h"
79 #define InitAllocator() InitNedmallocAllocator()
80 #define ExitAllocator() ExitNedmallocAllocator()
81 #define AllocMemory(x) AllocateNedmallocMemory(x)
82 #define AllocMemoryArray(x,y) AllocateNedmallocZeroedArray(x,y)
83 #define ReallocMemory(x,y,z) ReallocateNedmallocMemory(x,y,z)
84 #define FreeMemory(x) FreeNedmallocMemory(x)
85 #define IsAllocatorThreadSafe() IsNedmallocAllocatorThreadSafe()
87 #if defined _DEBUG && defined _MSC_VER
96 #define InitAllocator() do {} while (0);
99 #define ExitAllocator() do {} while (0);
104 #define AllocMemory(x) malloc(x)
112 #define AllocMemoryArray(x,y) calloc(x,y)
117 #define ReallocMemory(x,y,z) realloc(x,y)
120 #define FreeMemory(x) free(x)
123 #define IsAllocatorThreadSafe() (1)
The memory has already been freed so no action need be taken.
Definition: memory_allocations.h:41
Make a separate copy of the object pointed at by the source pointer.
Definition: memory_allocations.h:44
MEM_FLAG
An enum specifying the particular status of a piece of dynamically allocated memory for a particular ...
Definition: memory_allocations.h:38
Use the pointer value.
Definition: memory_allocations.h:47
bool CloseSharedMemory(struct MappedMemory *mapped_memory_p, void *value_p)
Close a shared memory segment.
void * OpenSharedMemory(struct MappedMemory *mapped_memory_p, int flags)
Open a shared memory segment.
Use the pointer value.
Definition: memory_allocations.h:50
bool FreeSharedMemory(struct MappedMemory *mapped_memory_p)
Free the shared memory segment for a given id.
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
struct MappedMemory * AllocateSharedMemory(const char *id_s, size_t size, int flags)
Allocate some memory that can shared between different processes.