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 15typedef struct mem_info mem_info; 16 17#ifdef __cplusplus 18extern "C" { 19#endif 20 21mem_info *mem_init(const char *name, uint32 start, uint32 length, uint32 blockSize, 22 uint32 heapEntries); 23void mem_destroy(mem_info *mem); 24status_t mem_alloc(mem_info *mem, uint32 size, void *tag, uint32 *blockID, uint32 *offset); 25status_t mem_free(mem_info *mem, uint32 blockID, void *tag); 26status_t mem_freetag(mem_info *mem, void *tag); 27 28#ifdef __cplusplus 29} 30#endif 31 32#endif /* _MEMORY_MANAGER_H */ 33