Log memory usage diagnostics, fix test_not, add ability to compile in debug mode

This commit is contained in:
Dan Hirsch 2012-05-12 23:04:54 +01:00
parent b6cb84df15
commit 3504bde301
5 changed files with 44 additions and 11 deletions

View file

@ -8,5 +8,12 @@ arena_t new_arena(size_t block_size); // pass 0 for default...
void* arena_malloc(arena_t arena, size_t count) __attribute__(( malloc, alloc_size(2) ));
void delete_arena(arena_t arena);
typedef struct {
size_t used;
size_t wasted;
} arena_stats_t;
void allocator_stats(arena_t arena, arena_stats_t *stats);
#endif // #ifndef LIB_ALLOCATOR__H__