30 lines
661 B
C
30 lines
661 B
C
/*
|
|
* Copyright 2019 Google LLC. All Rights Reserved. This file and proprietary
|
|
* source code may only be used and distributed under the Widevine Master
|
|
* License Agreement.
|
|
*/
|
|
|
|
#ifndef ODKITEE_BUMP_ALLOCATOR_H_
|
|
#define ODKITEE_BUMP_ALLOCATOR_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
/*
|
|
* Simple bump allocator. Allocate memory chunks from a fixed region
|
|
* at consecutively increasing offsets. The memory is all released
|
|
* when BumpAllocator_Reset is called.
|
|
*/
|
|
uint8_t* BumpAllocate(size_t size);
|
|
void BumpAllocator_Reset(void);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif //ODKITEE_BUMP_ALLOCATOR_H_
|