diff options
author | axel <axel@liljencrantz.se> | 2006-02-07 00:25:02 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-07 00:25:02 +1000 |
commit | 585191310bb476deb7bdd4214adcc8b1076c9fd4 (patch) | |
tree | d3d9391e592b04fc1cb7a4e7ecbac4c66f9b4a92 /halloc.h | |
parent | 530bbfc9ac3234149a939c65da3d448279bf7de9 (diff) |
First checkin of transition to using a new hierarchical memory allocator, some of the memory associated with a job is covered
darcs-hash:20060206142502-ac50b-ba1c9a4f64ea0f44f65303a125f9ddae5bd31e2f.gz
Diffstat (limited to 'halloc.h')
-rw-r--r-- | halloc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/halloc.h b/halloc.h new file mode 100644 index 00000000..a3bea49f --- /dev/null +++ b/halloc.h @@ -0,0 +1,18 @@ +/** \file halloc.h + A hierarchical memory allocation system +*/ + +/** + Allocate new memory using specified parent memory context. If \c + context is null, a new root context is created. +*/ +void *halloc( void *context, size_t size ); + +/** + Free memory context and all children. Only root contexts may be + freed explicitly. +*/ +void halloc_free( void *context ); + +wchar_t *halloc_wcsdup( void *context, const wchar_t *str ); +wchar_t *halloc_wcsndup( void *context, const wchar_t *in, int c ); |