Quash Shell  0.1
A simple yet powerfull shell program
memory_pool.h
Go to the documentation of this file.
1 
11 #ifndef SRC_PARSING_MEMORY_POOL_H
12 #define SRC_PARSING_MEMORY_POOL_H
13 
14 #include <stdlib.h>
15 
22 void initialize_memory_pool(size_t size);
23 
34 void* memory_pool_alloc(size_t size);
35 
39 void destroy_memory_pool();
40 
49 char* memory_pool_strdup(const char* str);
50 
51 #endif
void initialize_memory_pool(size_t size)
Allocate the memory pool.
Definition: memory_pool.c:81
void destroy_memory_pool()
Free all memory allocated in the memory pool.
Definition: memory_pool.c:141
char * memory_pool_strdup(const char *str)
A version of strdup() that allocates the duplicate to the memory pool rather than with malloc directl...
Definition: memory_pool.c:146
void * memory_pool_alloc(size_t size)
Reserve some space in the memory pool and returns a unique address that can be written to and read fr...
Definition: memory_pool.c:96