|
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 source code of this file.
Macros | |
| #define | InitAllocator() do {} while (0); |
| Initialise the platform memory allocator. More... | |
| #define | ExitAllocator() do {} while (0); |
| Close the platform memory allocator. More... | |
| #define | AllocMemory(x) malloc(x) |
| Allocate the memory for, x, the given number of bytes. More... | |
| #define | AllocMemoryArray(x, y) calloc(x,y) |
| Allocate an array of memory where s is the given number of entries in the array with each entry being y bytes in size. More... | |
| #define | ReallocMemory(x, y, z) realloc(x,y) |
| Reallocate the memory for the given number of bytes. More... | |
| #define | FreeMemory(x) free(x) |
| Free the memory pointed to by x. More... | |
| #define | IsAllocatorThreadSafe() (1) |
| Is the current memory allocator suitable for use in a threaded environment> More... | |
Enumerations | |
| enum | MEM_FLAG { MF_ALREADY_FREED, MF_DEEP_COPY, MF_SHALLOW_COPY, MF_SHADOW_USE } |
| An enum specifying the particular status of a piece of dynamically allocated memory for a particular object. More... | |
Functions | |
| struct MappedMemory * | AllocateSharedMemory (const char *id_s, size_t size, int flags) |
| Allocate some memory that can shared between different processes. More... | |
| bool | FreeSharedMemory (struct MappedMemory *mapped_memory_p) |
| Free the shared memory segment for a given id. More... | |
| void * | OpenSharedMemory (struct MappedMemory *mapped_memory_p, int flags) |
| Open a shared memory segment. More... | |
| bool | CloseSharedMemory (struct MappedMemory *mapped_memory_p, void *value_p) |
| Close a shared memory segment. More... | |
| #define InitAllocator | ( | ) | do {} while (0); |
Initialise the platform memory allocator.
| #define ExitAllocator | ( | ) | do {} while (0); |
Close the platform memory allocator.
| #define AllocMemory | ( | x | ) | malloc(x) |
Allocate the memory for, x, the given number of bytes.
| #define AllocMemoryArray | ( | x, | |
| y | |||
| ) | calloc(x,y) |
Allocate an array of memory where s is the given number of entries in the array with each entry being y bytes in size.
If successful, all entries will be set to zero.
| #define ReallocMemory | ( | x, | |
| y, | |||
| z | |||
| ) | realloc(x,y) |
Reallocate the memory for the given number of bytes.
| #define FreeMemory | ( | x | ) | free(x) |
Free the memory pointed to by x.
| #define IsAllocatorThreadSafe | ( | ) | (1) |
Is the current memory allocator suitable for use in a threaded environment>