AuroraRuntime/Source/Memory/AuDefaultHeap.hpp

34 lines
1.2 KiB
C++
Raw Normal View History

/***
2024-03-19 15:47:42 +00:00
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
2024-03-19 15:47:42 +00:00
File: AuDefaultHeap.hpp
Date: 2021-6-13
Author: Reece
***/
2024-03-19 15:47:42 +00:00
#pragma once
#include "AuBaseHeap.hpp"
namespace Aurora::Memory
{
2024-03-19 15:47:42 +00:00
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;
2024-03-19 15:47:42 +00:00
AuSPtr<Heap> GetSelfReference() override;
Heap *GetSelfReferenceRaw() override;
void WalkHeap(bool(*fCallback)(void *, void *), void *pSecondArg) override;
2024-03-19 15:47:42 +00:00
void UpdateStats() override;
};
}