## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csBlockAllocatorAlignPolicy< A > Class Template Reference

This class implements a per-block allocating policy which aligns the first element on given byte boundary. More...

`#include <csutil/blockallocator.h>`

List of all members.

## Static Public Member Functions

static uint8 * | AllocBlock (size_t blocksize)
| Allocate a raw block of given size.
static void | FreeBlock (uint8 *p)
| Free a block.

## Detailed Description

### template<size_t A = 1>
class csBlockAllocatorAlignPolicy< A >

This class implements a per-block allocating policy which aligns the first element on given byte boundary.

It has a per-block overhead of `sizeof(void*)+alignment' bytes.

Definition at line 73 of file blockallocator.h.

## Member Function Documentation

template<size_t A = 1>
static uint8* csBlockAllocatorAlignPolicy< A >::AllocBlock | ( | size_t | blocksize | ) | `[inline, static]`

| Allocate a raw block of given size. Definition at line 79 of file blockallocator.h. References csAlignedMalloc().

template<size_t A = 1>
static void csBlockAllocatorAlignPolicy< A >::FreeBlock | ( | uint8 * | p | ) | `[inline, static]`

Free a block.

Remarks:
  Does not check that the block pointer is valid.

Definition at line 88 of file blockallocator.h.

References csAlignedFree().

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

- csutil/blockallocator.h