cds  1.4.0
cds::memory::michael::Heap< Options >::block_header Class Reference

Allocated block header. More...

#include <cds/memory/michael/allocator.h>

Detailed Description

template<typename... Options>
class cds::memory::michael::Heap< Options >::block_header

Allocated block header.

Each allocated block has 8-byte header. The header contains pointer to owner superblock descriptor and the redirection flag. If the block has been allocated by alloc, then the redirection flag is 0 and the block's structure is:

+---------------+
| blockHeader | [8 byte] pointer to owner superblock (flag=0)
+---------------+
| | <- memory allocated
| memory |
| |
+---------------+

If the block has been allocated by alloc_aligned, then it is possible that pointer returned must be aligned. In this case the redirection flag is 1 and the block's structure is:

+---------------+
+-> | blockHeader | [8 byte] pointer to owner superblock (flag=0)
| +---------------+
| | padding |
| | (unused) |
| | |
| +---------------+
+-- | blockHeader | [8 byte] pointer to block head (flag=1)
+---------------+
| | <- memory allocated
| memory |
| |
+---------------+

The documentation for this class was generated from the following file:

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1