Try to allocate scratchpad from dataset's 1 GB huge pages, if normal huge pages are not available

This commit is contained in:
SChernykh 2020-07-31 13:37:22 +02:00
parent 838cc08680
commit abb78302b8
5 changed files with 37 additions and 1 deletions

View file

@ -52,6 +52,7 @@ public:
inline bool isHugePages() const { return m_flags.test(FLAG_HUGEPAGES); }
inline bool isOneGbPages() const { return m_flags.test(FLAG_1GB_PAGES); }
inline size_t size() const { return m_size; }
inline size_t capacity() const { return m_capacity; }
inline uint8_t *raw() const { return m_scratchpad; }
inline uint8_t *scratchpad() const { return m_scratchpad; }
@ -88,6 +89,7 @@ private:
void freeLargePagesMemory();
const size_t m_size;
size_t m_capacity;
const uint32_t m_node;
std::bitset<FLAG_MAX> m_flags;
uint8_t *m_scratchpad = nullptr;