Skip to content

fixed_block_allocator block_size #18

@twiggler

Description

@twiggler

When allocating from a memory_stack using a fixed_block_allocator in debug mode , I have noticed that the effective size of the memory_stack on my machine is 24 bytes smaller than the requested block size. I have determined that 16 bytes are used by a fence; if I understand correctly, the remaining 8 bytes are used by the node of the intrusive list linking the blocks.

My questions are:

  1. How can I query the exact size of the overhead per block? I now fell back to to adding 32-bytes of slack.
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions