GNU Radio 2.x: gr_buffer.cc File Reference

Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

# gr_buffer.cc File Reference

`#include <gr_buffer.h>`
`#include <gr_vmcircbuf.h>`
`#include <gr_math.h>`
`#include <stdexcept>`
`#include <iostream>`
`#include <assert.h>`
`#include <algorithm>`

Include dependency graph for gr_buffer.cc:

## Functions
gr_buffer_sptr | gr_make_buffer (int nitems, size_t sizeof_item)
| Allocate a buffer that holds at least `nitems` of size `sizeof_item`.
gr_buffer_reader_sptr | gr_buffer_add_reader (gr_buffer_sptr buf)
| create a new gr_buffer_reader and attach it to buffer `buf`
long | gr_buffer_ncurrently_allocated ()
| returns # of gr_buffers currently allocated
long | gr_buffer_reader_ncurrently_allocated ()
| returns # of gr_buffer_readers currently allocated

## Function Documentation

gr_buffer_reader_sptr gr_buffer_add_reader | ( | gr_buffer_sptr | buf | ) |

| create a new gr_buffer_reader and attach it to buffer `buf`

long gr_buffer_ncurrently_allocated | ( |  | ) |

| returns # of gr_buffers currently allocated

long gr_buffer_reader_ncurrently_allocated | ( |  | ) |

| returns # of gr_buffer_readers currently allocated

gr_buffer_sptr gr_make_buffer | ( | int | nitems,
|  | size_t | sizeof_item
| ) |

| Allocate a buffer that holds at least `nitems` of size `sizeof_item`. The total size of the buffer will be rounded up to a system dependent boundary. This is typically the system page size, but under MS windows is 64KB.