First Publicly Shared Version of ODKiTEE v15
This commit is contained in:
31
serialization/shared_memory_allocator.h
Normal file
31
serialization/shared_memory_allocator.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2020 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_SHARED_MEMORY_ALLOCATOR_H_
|
||||
#define ODKITEE_SHARED_MEMORY_ALLOCATOR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* An allocator for shared memory
|
||||
*/
|
||||
void SharedMemory_Initialize(size_t initial_pool_size);
|
||||
uint8_t* SharedMemory_Allocate(uint16_t index, size_t size);
|
||||
size_t SharedMemory_GetSize(uint16_t index);
|
||||
uint8_t* SharedMemory_GetAddress(uint16_t index);
|
||||
void SharedMemory_Reset(void);
|
||||
void SharedMemory_Terminate(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif //ODKITEE_SHARED_MEMORY_ALLOCATOR_H_
|
||||
Reference in New Issue
Block a user