[+] AuMemory::HeapAccessor
This commit is contained in:
parent
2b69c07b67
commit
fc081615a7
@ -377,6 +377,7 @@ namespace Aurora::Memory
|
||||
|
||||
protected:
|
||||
friend struct ProxyHeap;
|
||||
friend struct HeapAccessor;
|
||||
|
||||
virtual AuSPtr<Heap> GetSelfReference() = 0; // may return empty/default. not all heaps are sharable.
|
||||
virtual Heap *GetSelfReferenceRaw() = 0;
|
||||
@ -392,6 +393,19 @@ namespace Aurora::Memory
|
||||
virtual void _Free(void* pBase) = 0;
|
||||
};
|
||||
|
||||
struct HeapAccessor
|
||||
{
|
||||
cstatic AuSPtr<Heap> GetSelfReference(Heap *pHeap)
|
||||
{
|
||||
return pHeap->GetSelfReference();
|
||||
}
|
||||
|
||||
cstatic Heap *GetSelfReferenceRaw(Heap *pHeap)
|
||||
{
|
||||
return pHeap->GetSelfReferenceRaw();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
Returns a heap interface backed by the default allocator
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user