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