Log memory usage diagnostics, fix test_not, add ability to compile in debug mode
This commit is contained in:
parent
b6cb84df15
commit
3504bde301
5 changed files with 44 additions and 11 deletions
|
|
@ -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__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue