mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-12-04 17:07:29 +00:00
33 lines
No EOL
647 B
C++
33 lines
No EOL
647 B
C++
/**
|
|
* @file mem.h
|
|
* @brief Memory allocation functions.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "os.h"
|
|
#include "types.h"
|
|
|
|
namespace nn
|
|
{
|
|
namespace mem
|
|
{
|
|
class StandardAllocator
|
|
{
|
|
public:
|
|
StandardAllocator();
|
|
|
|
void Initialize(void* address, u64 size);
|
|
void Finalize();
|
|
void* Reallocate(void* address, u64 newSize);
|
|
void* Allocate(u64 size);
|
|
void Free(void* address);
|
|
void Dump();
|
|
|
|
bool mIsInitialized; // _0
|
|
bool mIsEnabledThreadCache; // _1
|
|
u16 _2;
|
|
u64* mAllocAddr; // _4
|
|
};
|
|
};
|
|
}; |