Functions | |
void * | qfits_memory_malloc (size_t size, const char *filename, int lineno) |
Allocate memory. | |
void * | qfits_memory_calloc (size_t nmemb, size_t size, const char *filename, int lineno) |
Allocate memory. | |
char * | qfits_memory_falloc (char *name, size_t offs, size_t *size, const char *srcname, int srclin) |
Map a file's contents to memory as a char pointer. | |
void | qfits_memory_fdealloc (void *ptr, size_t offs, size_t size, const char *filename, int lineno) |
Free memory that has been allocated with falloc. | |
void | qfits_memory_free (void *ptr, const char *filename, int lineno) |
Free memory. | |
void * | qfits_memory_realloc (void *ptr, size_t size, const char *filename, int lineno) |
Re-Allocate memory. | |
char * | qfits_memory_strdup (const char *s, const char *filename, int lineno) |
Duplicate a string using calloc. | |
void | qfits_memory_status (void) |
Display memory status information. | |
int | qfits_memory_is_empty (void) |
Tell if there is still some memory allocated. |
mmap()
system call to be implemented in the local C library to function. This module has been tested on a number of current Unix * flavours and is reported to work fine. The current limitation is the limited number of pointers it can handle at the same time.
|
Allocate memory.
qfits_memory_calloc(nmemb, size, __FILE__, __LINE__) |
|
Map a file's contents to memory as a char pointer.
The offset indicates the starting point for the mapping, i.e. if you are not interested in mapping the whole file but only from a given place. The returned pointer ptr must be deallocated with qfits_memory_fdealloc(ptr) |
|
Free memory that has been allocated with falloc.
|
|
Free memory.
|
|
Tell if there is still some memory allocated.
|
|
Allocate memory.
qfits_memory_malloc(size, __FILE__, __LINE__) |
|
Re-Allocate memory.
qfits_memory_realloc(nmemb, size, __FILE__, __LINE__) |
|
Display memory status information.
|
|
Duplicate a string using calloc.
qfits_memory_strdup(s, __FILE__, __LINE__) This function calls qfits_memory_malloc() to do the allocation. |