32 lines
757 B
C
32 lines
757 B
C
/*
|
|
* 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_
|