coastline 0.0.4
Loading...
Searching...
No Matches
memorybudget.h
Go to the documentation of this file.
1#ifndef COASTLINE_EAR_MEMORY_BUDGET_H
2#define COASTLINE_EAR_MEMORY_BUDGET_H
3
4#include <stdint.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
17
22uint32_t GetSampleMemoryLimit(void);
23
28uint32_t GetSampleMemoryUsed(void);
29
37int __stdcall ReserveSampleMemory(uint32_t bytes);
38
44void __stdcall ReleaseSampleMemory(uint32_t bytes);
45
52int __stdcall SetSampleMemoryLimit(uint32_t bytes);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* COASTLINE_EAR_MEMORY_BUDGET_H */
uint32_t GetSampleMemoryLimit(void)
int InitializeSampleMemoryBudget(void)
Initialise a sample budget from available Windows page-file capacity or SDL system RAM.
void __stdcall ReleaseSampleMemory(uint32_t bytes)
Subtract released storage from tracked usage without freeing memory or checking underflow.
uint32_t GetSampleMemoryUsed(void)
int __stdcall SetSampleMemoryLimit(uint32_t bytes)
Change the budget limit only when the requested limit does not exceed current usage.
int __stdcall ReserveSampleMemory(uint32_t bytes)
Account for a reservation without allocating memory.