GNU Radio 3.4.2 C++ API
gc_aligned_alloc.h File Reference
#include <boost/shared_ptr.hpp>
Include dependency graph for gc_aligned_alloc.h:

Go to the source code of this file.

Functions

void * gc_aligned_alloc (size_t size, size_t alignment=128)
 Return pointer to chunk of storage of size size bytes. The allocation will be aligned to an alignment boundary.

Function Documentation

void* gc_aligned_alloc ( size_t  size,
size_t  alignment = 128 
)

Return pointer to chunk of storage of size size bytes. The allocation will be aligned to an alignment boundary.

Parameters:
sizeis the number of bytes to allocate
alignmentis the minimum storage alignment in bytes; must be a power of 2.

Throws if can't allocate memory. The storage should be freed with "free" when done. The memory is initialized to zero.