From 92f357bebdf7e1a330337430324194d1abdeb7b4 Mon Sep 17 00:00:00 2001 From: Jari Date: Mon, 3 Jul 2023 16:47:43 +0100 Subject: [PATCH 1/2] Use PAGE_SIZE = 0MB in AppendAlloc --- src/ssids/cpu/AppendAlloc.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssids/cpu/AppendAlloc.hxx b/src/ssids/cpu/AppendAlloc.hxx index a7261e00..1ab70647 100644 --- a/src/ssids/cpu/AppendAlloc.hxx +++ b/src/ssids/cpu/AppendAlloc.hxx @@ -65,7 +65,7 @@ private: * Deallocation is not supported. */ class Pool { - const size_t PAGE_SIZE = 8*1024*1024; // 8MB + const size_t PAGE_SIZE = 0; // 0MB public: Pool(size_t initial_size) : top_page_(new Page(std::max(PAGE_SIZE, initial_size))) From 1f252664a12b5a1300c6202793dd314f266da4b4 Mon Sep 17 00:00:00 2001 From: Jari Date: Tue, 4 Jul 2023 09:45:03 +0100 Subject: [PATCH 2/2] Comment on setting PAGE_SIZE = 0MB --- src/ssids/cpu/AppendAlloc.hxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ssids/cpu/AppendAlloc.hxx b/src/ssids/cpu/AppendAlloc.hxx index 1ab70647..2428a092 100644 --- a/src/ssids/cpu/AppendAlloc.hxx +++ b/src/ssids/cpu/AppendAlloc.hxx @@ -16,7 +16,7 @@ namespace spral { namespace ssids { namespace cpu { namespace append_alloc_internal { /** A single fixed size page of memory with allocate function. - * We are required to guaruntee it is zero'd, so use calloc rather than anything + * We are required to guarantee it is zero'd, so use calloc rather than anything * else for the allocation. * Deallocation is not supported. */ @@ -66,6 +66,8 @@ private: */ class Pool { const size_t PAGE_SIZE = 0; // 0MB + // Changed to 0MB to allow pages of no minimum size for performance + // see https://github.com/ralna/spral/issues/119 for more details public: Pool(size_t initial_size) : top_page_(new Page(std::max(PAGE_SIZE, initial_size)))