Reformat RSA

This commit is contained in:
Reece Wilson 2021-07-12 13:17:16 +01:00
parent 8233825353
commit 29e5593308
3 changed files with 33 additions and 34 deletions

View File

@ -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)