34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuDefaultHeap.hpp
|
|
Date: 2021-6-13
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "AuBaseHeap.hpp"
|
|
|
|
namespace Aurora::Memory
|
|
{
|
|
struct DefaultHeap : BaseHeap
|
|
{
|
|
AuSPtr<Heap> AllocateDivision(AuUInt32 heap, AuUInt32 alignment) override;
|
|
void *_ZAlloc(Types::size_t length) override;
|
|
void *_ZAlloc(Types::size_t length, Types::size_t align) override;
|
|
Types::size_t GetChunkSize(const void *head) override;
|
|
void *_FAlloc(Types::size_t length) override;
|
|
void *_FAlloc(Types::size_t length, Types::size_t align) override;
|
|
void *_ZRealloc(void *buffer, Types::size_t length, Types::size_t align) override;
|
|
void *_ZRealloc(void *buffer, Types::size_t length) override;
|
|
void *_FRealloc(void *buffer, Types::size_t length, Types::size_t align) override;
|
|
void *_FRealloc(void *buffer, Types::size_t length) override;
|
|
void _Free(void *buffer) override;
|
|
|
|
AuSPtr<Heap> GetSelfReference() override;
|
|
Heap *GetSelfReferenceRaw() override;
|
|
|
|
void WalkHeap(bool(*fCallback)(void *, void *), void *pSecondArg) override;
|
|
void UpdateStats() override;
|
|
};
|
|
} |