diff options
author | Josh Blum | 2012-09-18 11:20:34 -0700 |
---|---|---|
committer | Josh Blum | 2012-09-18 12:24:13 -0700 |
commit | 85e3a7a3a450d0a778d0b730316c7d993d1f5c5f (patch) | |
tree | 4fe816610f1c1a173a157624739e056ac875e4f0 /include | |
parent | d575f066a8f9e5330645aae5cb8b42c94131471a (diff) | |
download | sandhi-85e3a7a3a450d0a778d0b730316c7d993d1f5c5f.tar.gz sandhi-85e3a7a3a450d0a778d0b730316c7d993d1f5c5f.tar.bz2 sandhi-85e3a7a3a450d0a778d0b730316c7d993d1f5c5f.zip |
added hook for custom output buffer allocator
Diffstat (limited to 'include')
-rw-r--r-- | include/gnuradio/block.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/gnuradio/block.hpp b/include/gnuradio/block.hpp index cf0cebf..ae09149 100644 --- a/include/gnuradio/block.hpp +++ b/include/gnuradio/block.hpp @@ -224,6 +224,25 @@ struct GRAS_API Block : Element */ void set_buffer_affinity(const Affinity &affinity); + /*! + * The output buffer allocator method. + * This method is called by the scheduler to allocate output buffers. + * The user may overload this method to create a custom allocator. + * + * Example use case: + * //TODO code example + * + * \param which_output the output port index number + * \param token the token for the buffer's returner + * \param recommend_length the schedulers recommended length in bytes + * \return the token used for the buffer allocation (may be the same) + */ + virtual SBufferToken output_buffer_allocator( + const size_t which_output, + const SBufferToken &token, + const size_t recommend_length + ); + //TODO overload for allocate output buffer(index) }; |