Skip to content

Commit a0797d2

Browse files
committed
Start _allocation_batch_size at 32, seems faster
1 parent 27a561d commit a0797d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/chainbase/chainbase_node_allocator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ namespace chainbase {
8888
bip::offset_ptr<list_item> _freelist{};
8989
bip::offset_ptr<ss_allocator_t> _ss_alloc;
9090
bip::offset_ptr<segment_manager> _manager;
91-
size_t _allocation_batch_size = 4;
91+
size_t _allocation_batch_size = 32;
9292
size_t _freelist_size = 0;
9393
};
9494

include/chainbase/small_size_allocator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class allocator {
9090
bip::offset_ptr<char> _block_start;
9191
bip::offset_ptr<char> _block_end;
9292
backing_allocator _back_alloc;
93-
size_t _allocation_batch_size = 4;
93+
size_t _allocation_batch_size = 32;
9494
size_t _freelist_size = 0;
9595
size_t _num_blocks_allocated = 0; // number of blocks allocated from boost segment allocator
9696
mutable std::mutex _m;

0 commit comments

Comments
 (0)