First Publicly Shared Version of ODKiTEE v15
This commit is contained in:
29
serialization/bump_allocator.h
Normal file
29
serialization/bump_allocator.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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_
|
||||
Reference in New Issue
Block a user