1 /* 2 * Copyright 2006, Haiku Inc. 3 * Copyright 2002, Thomas Kurschel. 4 * 5 * Distributed under the terms of the MIT license. 6 */ 7 #ifndef _MEMORY_MANAGER_H 8 #define _MEMORY_MANAGER_H 9 10 /** Memory manager used for graphics mem */ 11 12 #include <OS.h> 13 14 15 typedef struct mem_info mem_info; 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 mem_info *mem_init(const char *name, uint32 start, uint32 length, uint32 blockSize, 22 uint32 heapEntries); 23 void mem_destroy(mem_info *mem); 24 status_t mem_alloc(mem_info *mem, uint32 size, void *tag, uint32 *blockID, uint32 *offset); 25 status_t mem_free(mem_info *mem, uint32 blockID, void *tag); 26 status_t mem_freetag(mem_info *mem, void *tag); 27 28 #ifdef __cplusplus 29 } 30 #endif 31 32 #endif /* _MEMORY_MANAGER_H */ 33