1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2024-12-12 00:08:54 +01:00
rpi-vk-driver/driver/LinearAllocator.h

27 lines
478 B
C
Raw Normal View History

#pragma once
2018-05-13 16:29:15 +02:00
#if defined (__cplusplus)
extern "C" {
#endif
#include "CustomAssert.h"
#include <stdint.h>
typedef struct LinearAllocator
{
char* buf; //preallocated buffer
unsigned offset;
unsigned size;
} LinearAllocator;
2018-08-26 15:11:43 +02:00
LinearAllocator createLinearAllocator(char* b, unsigned s);
void destroyLinearAllocator(LinearAllocator* la);
void* linearAllocte(LinearAllocator* la, unsigned s);
void linearFree(LinearAllocator* la, void* p);
2018-05-13 16:29:15 +02:00
#if defined (__cplusplus)
}
#endif