1/* 2 * Copyright 2009, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _REALTIME_ALLOC_H 6#define _REALTIME_ALLOC_H 7 8 9#include <SupportDefs.h> 10 11 12#ifdef __cplusplus 13extern "C" { 14#endif 15 16typedef struct rtm_pool rtm_pool; 17 18#ifdef __cplusplus 19status_t rtm_create_pool(rtm_pool** _pool, size_t totalSize, 20 const char* name = NULL); 21#else 22status_t rtm_create_pool(rtm_pool** _pool, size_t totalSize, const char* name); 23#endif 24 25status_t rtm_delete_pool(rtm_pool* pool); 26 27void* rtm_alloc(rtm_pool* pool, size_t size); 28status_t rtm_free(void* data); 29status_t rtm_realloc(void** data, size_t new_size); 30status_t rtm_size_for(void* data); 31status_t rtm_phys_size_for(void* data); 32size_t rtm_available(rtm_pool* pool); 33 34rtm_pool* rtm_default_pool(); 35 36#ifdef __cplusplus 37} 38#endif 39 40#endif // _REALTIME_ALLOC_H 41