| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef MEMLEAK_H |
| #define MEMLEAK_H |
| |
| #include <stdio.h> |
| |
| #define ne_malloc(s) ne_malloc_ml(s, __FILE__, __LINE__) |
| #define ne_calloc(s) ne_calloc_ml(s, __FILE__, __LINE__) |
| #define ne_realloc(p, s) ne_realloc_ml(p, s, __FILE__, __LINE__) |
| #define ne_strdup(s) ne_strdup_ml(s, __FILE__, __LINE__) |
| #define ne_strndup(s, n) ne_strndup_ml(s, n, __FILE__, __LINE__) |
| #define ne_free ne_free_ml |
| |
| |
| void *ne_malloc_ml(size_t size, const char *file, int line); |
| void *ne_calloc_ml(size_t size, const char *file, int line); |
| void *ne_realloc_ml(void *ptr, size_t s, const char *file, int line); |
| char *ne_strdup_ml(const char *s, const char *file, int line); |
| char *ne_strndup_ml(const char *s, size_t n, const char *file, int line); |
| void ne_free_ml(void *ptr); |
| |
| |
| void ne_alloc_dump(FILE *f); |
| |
| |
| extern size_t ne_alloc_used; |
| |
| #endif |