Comments (2)
How can I query the exact size of the overhead per block? I now fell back to to adding 32-bytes of slack.
There is detail::memory_block_stack::implementation_offset
, I can make that public.
Although 8 wasted bytes is not a big deal for me, is it conceptually speaking necessary to keep the node around when the block is allocated?
The arena has to deallocate all blocks at the end, so there needs to be some pointer to it. And while the stack itself also stores a pointer, it can grow, so it can't rely on that. I could in theory optimize it for fixed_block_allocator
but I don't know whether that's really worth it.
from memory.
Ah, I see.
I share your doubts about optimizing for fixed_block_allocator
. Making detail::memory_block_stack::implementation_offset
public makes the amount of necessary slack space predictable, and would be a welcome improvement.
from memory.
Related Issues (20)
- Build error because of doctest HOT 5
- Is container_node_sizes_impl.hpp platform related? HOT 6
- mac build failure - Unable to determine alignment of C++ type long long - no error text HOT 3
- cross-compiling for qnx 32 bit HOT 2
- Wrapping Stateful to Stateless allocators HOT 2
- Compile error when set FOONATHAN_MEMORY_TEMPORARY_STACK_MODE to 1 HOT 1
- Making `container node sizes` optional? HOT 3
- Strange exception from unordered_set with memory_stack, on MSVC HOT 9
- Library triggers bug in MSVC++ v19 (VS 2022) under modern C++ standards, preventing compilation HOT 2
- `memory_pool_collection` carves too little memory from block if there are many buckets HOT 4
- [docs/examples] associative containers HOT 4
- memory_block_stack::owns() seems wrong? HOT 1
- Time for a new release? HOT 1
- problem with std::is_abstract for unique_ptr with allocator inside struct definition HOT 1
- give allocator_polymorphic_deleter a default constructor HOT 1
- Thread safety
- Build issues on MacOS while building tools with static flag HOT 3
- MinGW build fails due to "#warning" HOT 1
- Can a vector use a memory pool with a small_node_pool ?
- Unable to determine node size of C++ container HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memory.