From 0183e33d9a4759764716e771b85e19f7a997b8bd Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Wed, 10 Mar 2010 20:11:06 +0200 Subject: mem: add mmap allocator use it for heaps and fiber stacks. --- include/libtf/memory.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/libtf/memory.h (limited to 'include/libtf/memory.h') diff --git a/include/libtf/memory.h b/include/libtf/memory.h new file mode 100644 index 0000000..04c2242 --- /dev/null +++ b/include/libtf/memory.h @@ -0,0 +1,22 @@ +/* memory.h - libtf memory allocator + * + * Copyright (C) 2009-2010 Timo Teräs + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 or later as + * published by the Free Software Foundation. + * + * See http://www.gnu.org/ for details. + */ + +#ifndef TF_MEMORY_H +#define TF_MEMORY_H + +/* Big/bulk memory allocation using mmap() or similar */ +void *tf_bmem_alloc(size_t size); +void *tf_bmem_resize(void *ptr, size_t oldsize, size_t newsize); +void tf_bmem_free(void *ptr, size_t size); + +#endif + -- cgit v1.2.3