This source file includes following definitions.
- MemAlloc
- MemFree
- GetPPB_Memory_Dev_0_1_Thunk
#include <stdlib.h>
#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
namespace ppapi {
namespace {
void* MemAlloc(uint32_t num_bytes) { return malloc(num_bytes); }
void MemFree(void* ptr) { free(ptr); }
const PPB_Memory_Dev ppb_memory = {&MemAlloc, &MemFree};
}
namespace thunk {
PPAPI_SHARED_EXPORT const PPB_Memory_Dev_0_1* GetPPB_Memory_Dev_0_1_Thunk() {
return &ppb_memory;
}
}
}