vfs: check userland buffers before reading them.
[haiku.git] / headers / private / graphics / common / memory_manager.h
bloba128116b3bc9e15dbb14285600372280e2a7bb3f
1 /*
2 * Copyright 2006, Haiku Inc.
3 * Copyright 2002, Thomas Kurschel.
5 * Distributed under the terms of the MIT license.
6 */
7 #ifndef _MEMORY_MANAGER_H
8 #define _MEMORY_MANAGER_H
10 /** Memory manager used for graphics mem */
12 #include <OS.h>
15 typedef struct mem_info mem_info;
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
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);
28 #ifdef __cplusplus
30 #endif
32 #endif /* _MEMORY_MANAGER_H */