mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2026-03-22 09:45:29 -05:00
21 lines
862 B
C++
21 lines
862 B
C++
#pragma once
|
|
#include "IPluginHeapMemoryAllocator.h"
|
|
|
|
class DefaultPluginHeapMemoryAllocator : public IPluginHeapMemoryAllocator {
|
|
public:
|
|
~DefaultPluginHeapMemoryAllocator() override = default;
|
|
MEMAllocFromDefaultHeapFn *GetAllocFunctionAddress() const override;
|
|
MEMAllocFromDefaultHeapExFn *GetAllocExFunctionAddress() const override;
|
|
MEMFreeToDefaultHeapFn *GetFreeFunctionAddress() const override;
|
|
std::optional<PluginMemorySnapshot> GetHeapMemoryUsageSnapshot() const override;
|
|
|
|
static DefaultPluginHeapMemoryAllocator gDefaultPluginHeapMemoryAllocator;
|
|
|
|
private:
|
|
DefaultPluginHeapMemoryAllocator();
|
|
|
|
MEMAllocFromDefaultHeapFn *mMemoryMappingModuleAllocPtr = nullptr;
|
|
MEMAllocFromDefaultHeapExFn *mMemoryMappingModuleAllocExPtr = nullptr;
|
|
MEMFreeToDefaultHeapFn *mMemoryMappingModuleFreePtr = nullptr;
|
|
};
|