| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::transport::buffer_pool Class Reference

`#include <uhd/transport/buffer_pool.hpp>`

Inheritance diagram for uhd::transport::buffer_pool:

## Detailed Description

A buffer pool manages memory for a homogeneous set of buffers. Each buffer is the pool start at a 16-byte alignment boundary.

## Public Types
typedef std::shared_ptr< buffer_pool > | sptr
typedef void * | ptr_type

## Public Member Functions
| ~buffer_pool ()=default
ptr_type | at (const size_t index) const
| Get a pointer to the buffer start at the specified index.
size_t | size () const
| Get the number of buffers in this pool.

## Static Public Member Functions
static sptr | make (const size_t num_buffs, const size_t buff_size, const size_t alignment=16)

## Member Typedef Documentation

## ◆ ptr_type

typedef void* uhd::transport::buffer_pool::ptr_type

## ◆ sptr

typedef std::shared_ptr<buffer_pool> uhd::transport::buffer_pool::sptr

## Constructor & Destructor Documentation

## ◆ ~buffer_pool()

uhd::transport::buffer_pool::~buffer_pool | ( |  | ) |
| default

## Member Function Documentation

## ◆ at()

ptr_type uhd::transport::buffer_pool::at | ( | const size_t | index | ) | const
| inline

Get a pointer to the buffer start at the specified index.

## ◆ make()

sptr uhd::transport::buffer_pool::make | ( | const size_t | num_buffs,
|  | const size_t | buff_size,
|  | const size_t | alignment = 16 )
| static

Make a new buffer pool.

Parameters

  num_buffs | the number of buffers to allocate
  buff_size | the size of each buffer in bytes
  alignment | the alignment boundary in bytes

Returns
  a new buffer pool buff_size X num_buffs

## ◆ size()

size_t uhd::transport::buffer_pool::size | ( |  | ) | const
| inline

Get the number of buffers in this pool.

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

- buffer_pool.hpp