Lugdunum  0.1.0
Heap.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <lug/System/Export.hpp>
5 
6 namespace lug {
7 namespace System {
8 namespace Memory {
9 namespace Area {
10 
11 template <size_t PageSize = 4096, size_t PageCount = 1>
12 class Heap : public IArea {
13 public:
14  Heap();
15  Heap(const Heap&) = delete;
16  Heap(Heap&&) = delete;
17 
18  Heap& operator=(const Heap&) = delete;
19  Heap& operator=(Heap&&) = delete;
20 
21  ~Heap();
22 
23  Page* requestNextPage() override;
24 
25 private:
26  void* _data{nullptr};
27 
28  size_t _current{0};
29  Page _pages[PageCount];
30 };
31 
33 
34 } // Area
35 } // Memory
36 } // System
37 } // lug
Heap & operator=(const Heap &)=delete
Page * requestNextPage() override
Definition: Heap.inl:23
Page _pages[PageCount]
Definition: Heap.hpp:29