haiku/headers/os/media/RealtimeAlloc.h
Axel Dörfler ccedee2295 * Replaced rtm_* placeholders with a real implementation based on the boot
loader's heap. Unlike the BeBook documents, we always lock their memory,
  though.
* Added Haiku extension rtm_available() that returns how much space is left in
  a pool.
* I've disabled the undocumented functions for now - please open a bug report
  if you encounter them used in applications.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-01 17:21:46 +00:00

41 lines
841 B
C

/*
* Copyright 2009, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _REALTIME_ALLOC_H
#define _REALTIME_ALLOC_H
#include <SupportDefs.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct rtm_pool rtm_pool;
#ifdef __cplusplus
status_t rtm_create_pool(rtm_pool** _pool, size_t totalSize,
const char* name = NULL);
#else
status_t rtm_create_pool(rtm_pool** _pool, size_t totalSize, const char* name);
#endif
status_t rtm_delete_pool(rtm_pool* pool);
void* rtm_alloc(rtm_pool* pool, size_t size);
status_t rtm_free(void* data);
status_t rtm_realloc(void** data, size_t new_size);
status_t rtm_size_for(void* data);
status_t rtm_phys_size_for(void* data);
size_t rtm_available(rtm_pool* pool);
rtm_pool* rtm_default_pool();
#ifdef __cplusplus
}
#endif
#endif // _REALTIME_ALLOC_H