Reformat RSA
This commit is contained in:
parent
8233825353
commit
29e5593308
@ -18,8 +18,7 @@ namespace Aurora::Memory
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InternalHeap() : base_(nullptr), mutex_(nullptr), heap_(nullptr), _count(0)
|
InternalHeap() : base_(nullptr), mutex_(nullptr), heap_(nullptr), _count(0)
|
||||||
{
|
{ }
|
||||||
}
|
|
||||||
|
|
||||||
~InternalHeap();
|
~InternalHeap();
|
||||||
|
|
||||||
@ -55,18 +54,16 @@ namespace Aurora::Memory
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Threading::Primitives::MutexUnique_t mutex_;
|
Threading::Primitives::MutexUnique_t mutex_;
|
||||||
void *base_{};
|
void *base_ {};
|
||||||
O1HeapInstance *heap_{};
|
O1HeapInstance *heap_ {};
|
||||||
int _count{};
|
int _count {};
|
||||||
bool _isDangling{};
|
bool _isDangling {};
|
||||||
};
|
};
|
||||||
|
|
||||||
InternalHeap::~InternalHeap()
|
InternalHeap::~InternalHeap()
|
||||||
{
|
{
|
||||||
SysAssertDbgExp(_count == 0);
|
SysAssertDbgExp(_count == 0);
|
||||||
|
|
||||||
mutex_.reset();
|
|
||||||
|
|
||||||
if (base_)
|
if (base_)
|
||||||
{
|
{
|
||||||
o1HeapReleaseCpp(heap_);// ->~O1HeapInstance(); // TODO: make free func
|
o1HeapReleaseCpp(heap_);// ->~O1HeapInstance(); // TODO: make free func
|
||||||
@ -75,6 +72,8 @@ namespace Aurora::Memory
|
|||||||
base_ = nullptr;
|
base_ = nullptr;
|
||||||
mi_collect(false);
|
mi_collect(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InternalHeap::Init(AuUInt length)
|
bool InternalHeap::Init(AuUInt length)
|
||||||
|
Loading…
Reference in New Issue
Block a user