pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdlib.h>
Go to the source code of this file.
Functions | |
void | leaky_init (void) |
Set up atexit() hook. | |
void | leaky_uninit (void) |
Free all allocations. | |
void * | leaky_malloc (size_t size) |
Allocate memory, remember the pointer and free it after exit from the application. | |
void * | leaky_calloc (size_t nmemb, size_t size) |
Same as leaky_malloc but this one wraps calloc(). | |
void * | leaky_realloc (void *old_memory, size_t size) |
Reallocate memory, remember the new pointer and free it after exit from the application. | |
char * | leaky_strdup (const char *src) |
strdup() using leaky_malloc(). |
void* leaky_calloc | ( | size_t | nmemb, |
size_t | size | ||
) |
Same as leaky_malloc but this one wraps calloc().
Definition at line 81 of file free_atexit.c.
References leaky_malloc().
void leaky_init | ( | void | ) |
Set up atexit() hook.
Can be avoided if leaky_uninit() is called by hand.
Definition at line 143 of file free_atexit.c.
References leaky_uninit().
Referenced by main().
void* leaky_malloc | ( | size_t | size | ) |
Allocate memory, remember the pointer and free it after exit from the application.
Definition at line 66 of file free_atexit.c.
References free_list, free_size, malloc(), and realloc().
Referenced by leaky_calloc(), leaky_realloc(), and leaky_strdup().
void* leaky_realloc | ( | void * | old_memory, |
size_t | size | ||
) |
Reallocate memory, remember the new pointer and free it after exit from the application.
Definition at line 94 of file free_atexit.c.
References free_list, leaky_malloc(), and realloc().
char* leaky_strdup | ( | const char * | src | ) |
strdup() using leaky_malloc().
Definition at line 116 of file free_atexit.c.
References leaky_malloc(), and len.
void leaky_uninit | ( | void | ) |
Free all allocations.
Definition at line 127 of file free_atexit.c.
References free_list, and free_size.
Referenced by leaky_init().