Compare commits

..

2 Commits

Author SHA1 Message Date
Brett be87d29128 get rid of alloc message 2024-09-04 16:16:56 -04:00
Brett a19712a4d7 fetch allocator 2024-09-04 16:05:35 -04:00
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(blt-gp VERSION 0.1.47)
project(blt-gp VERSION 0.1.49)
include(CTest)

View File

@ -116,7 +116,7 @@ namespace blt::gp
}
};
template<typename Alloc = blt::mmap_huge_allocator>
template<typename Alloc = blt::aligned_huge_allocator>
class variable_bump_allocator
{
public:
@ -241,7 +241,7 @@ namespace blt::gp
void push_block(blt::size_t bytes)
{
auto blk = allocate_block(bytes);
BLT_TRACE("Allocated block %p", blk);
// BLT_TRACE("Allocated block %p", blk);
blk->metadata.next = head;
head = blk;
}
@ -256,7 +256,7 @@ namespace blt::gp
return blk;
}
auto size = align_size_to(bytes + sizeof(typename block_t::block_metadata_t), default_block_size);
auto* ptr = static_cast<block_t*>(alloc.allocate(size, blt::huge_page_t::BLT_2MB_PAGE));
auto* ptr = static_cast<block_t*>(alloc.allocate(size));
new(ptr) block_t{size};
return ptr;
}

@ -1 +1 @@
Subproject commit 82cc1aff9688e1917e261bd341178562f37e190a
Subproject commit 7198a8b0c32e35c9d80d8e44ff17c7199ddde6f8