halloc.c File Reference
Detailed Description
Hashtable-tracked allocator.
Small chunks are allocated via walloc(), whereas large chunks are served via alloc_pages(). The interface is the same as that of malloc()/free(). The hashtable keeps track of the sizes which should gain a more compact memory layout and is considered more cache-friendly. alloc_pages() may cause an overhead up to (pagesize - 1) per allocation. The advantage is that the pages will be unmapped on hfree().
Define USE_HALLOC to use this instead of the default memory allocation functions used.
- Author:
- Christian Biere
- Date:
- 2006
#include "common.h"
#include "halloc.h"
#include "hashtable.h"
#include "pagetable.h"
#include "misc.h"
#include "malloc.h"
#include "walloc.h"
#include "glib-missing.h"
#include "override.h"
Function Documentation
| size_t halloc_bytes_allocated |
( |
void |
|
) |
|
|
| size_t halloc_chunks_allocated |
( |
void |
|
) |
|
|
| void halloc_init |
( |
void |
|
) |
|
|
Variable Documentation
Generated on Sat Jun 30 17:53:27 2007 for gtk-gnutella by
1.3.9.1