From 7198a8b0c32e35c9d80d8e44ff17c7199ddde6f8 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Wed, 4 Sep 2024 16:03:13 -0400 Subject: [PATCH] silly little guy (fix the allocator) --- CMakeLists.txt | 2 +- LICENSE | 4 ++-- README.md | 2 +- include/blt/std/mmap.h | 7 ++++++- libraries/parallel-hashmap | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1ecb21..81bca4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.19.6) +set(BLT_VERSION 0.19.7) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/LICENSE b/LICENSE index 649f944..05bfb30 100644 --- a/LICENSE +++ b/LICENSE @@ -238,7 +238,7 @@ and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work +beyond what the individual_t works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -266,7 +266,7 @@ in one of these ways: conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - c) Convey individual copies of the object code with a copy of the + c) Convey individual_t copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord diff --git a/README.md b/README.md index 3f68e13..3bc328d 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ If you are using BLT as a CMake library (as you should!) this is done for you. - Using CMake - Several options are provided which disable various logging contexts, as such global logging can be disabled by passing `-DBLT_DISABLE_LOGGING:BOOL=ON` - Options follow the pattern of `BLT_DISABLE_LEVEL` where level is one of `TRACE`,`DEBUG`,`INFO`,`WARN`,`ERROR`, or `FATAL`. - - This allows for individual logging levels to be disabled while leaving the others functional. These options can be combined. + - This allows for individual_t logging levels to be disabled while leaving the others functional. These options can be combined. - See CMakeLists.txt for a complete list of options. - Standalone - The CMake options define global variables in a config file. If you are using logging standalone you will need to remove the config include. diff --git a/include/blt/std/mmap.h b/include/blt/std/mmap.h index a0888b1..01dac95 100644 --- a/include/blt/std/mmap.h +++ b/include/blt/std/mmap.h @@ -74,7 +74,10 @@ namespace blt class mmap_huge_allocator { public: - void* allocate(blt::size_t bytes, huge_page_t page_type) // NOLINT + explicit mmap_huge_allocator(huge_page_t page_type): page_type(page_type) + {} + + void* allocate(blt::size_t bytes) // NOLINT { return allocate_huge_pages(page_type, bytes); } @@ -83,6 +86,8 @@ namespace blt { mmap_free(ptr, bytes); } + private: + huge_page_t page_type; }; class aligned_huge_allocator diff --git a/libraries/parallel-hashmap b/libraries/parallel-hashmap index 8a889d3..d88c5e1 160000 --- a/libraries/parallel-hashmap +++ b/libraries/parallel-hashmap @@ -1 +1 @@ -Subproject commit 8a889d3699b3c09ade435641fb034427f3fd12b6 +Subproject commit d88c5e15079047777b418132ece5879e7c9aaa2b