haiku/headers/private/graphics/common/memory_manager.h
Axel Dörfler 9095e05d8d * Renamed memmgr.c|h to memory_manager.c|h.
* The functions now check the acquire_sem() result.
* mem_freetag() will return an status code now, too.
* Moved the mem_block and mem_info definitions into the source file; no
  reason to have them public.
* You can now give the memory manager a name which it will use for its
  heap area and lock.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-24 15:09:46 +00:00

33 lines
722 B
C

/*
* Copyright 2006, Haiku Inc.
* Copyright 2002, Thomas Kurschel.
*
* Distributed under the terms of the MIT license.
*/
#ifndef _MEMORY_MANAGER_H
#define _MEMORY_MANAGER_H
/** Memory manager used for graphics mem */
#include <OS.h>
typedef struct mem_info mem_info;
#ifdef __cplusplus
extern "C" {
#endif
mem_info *mem_init(const char *name, uint32 start, uint32 length, uint32 blockSize,
uint32 heapEntries);
void mem_destroy(mem_info *mem);
status_t mem_alloc(mem_info *mem, uint32 size, void *tag, uint32 *blockID, uint32 *offset);
status_t mem_free(mem_info *mem, uint32 blockID, void *tag);
status_t mem_freetag(mem_info *mem, void *tag);
#ifdef __cplusplus
}
#endif
#endif /* _MEMORY_MANAGER_H */