Skip to content
Discussion options

You must be logged in to vote

To take a step back, Fw::Buffer wraps (but does not own) a buffer to hold data. It is our way of passing U8* around without losing track of the size. The data in these buffers is owned by something else (component with stack memory, StaticMemory component, and BufferManager component. Thus the buffer must be returned to its source or memory will be leaked. This what the deallocates do.

Let us look at each port:

  1. dataOutAllocate needed allocate a buffer for the data out port as we need a buffer to write things into. It will be returned/deallocated by a component later in the chain. This is usually hooked to the StaticMemory component or the BufferManager component.
  2. dataInDeallocate is used…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@LeStarch
Comment options

@LeStarch
Comment options

@teddylambert
Comment options

@LeStarch
Comment options

@SMorettini
Comment options

Answer selected by LeStarch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants