mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2024-11-29 11:24:14 +01:00
27 lines
478 B
C
27 lines
478 B
C
#pragma once
|
|
|
|
#if defined (__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "CustomAssert.h"
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct LinearAllocator
|
|
{
|
|
char* buf; //preallocated buffer
|
|
unsigned offset;
|
|
unsigned size;
|
|
} LinearAllocator;
|
|
|
|
LinearAllocator createLinearAllocator(char* b, unsigned s);
|
|
void destroyLinearAllocator(LinearAllocator* la);
|
|
void* linearAllocte(LinearAllocator* la, unsigned s);
|
|
void linearFree(LinearAllocator* la, void* p);
|
|
|
|
#if defined (__cplusplus)
|
|
}
|
|
#endif
|
|
|