Imaging Control 4 C++ Library 1.2.0
Loading...
Searching...
No Matches
SnapSink::CustomAllocationStrategy Struct Reference

Specifies a custom allocation strategy. More...

Public Attributes

size_t num_buffers_allocate_on_connect
 Defines the number of buffers to auto-allocate when the stream is set up.
 
size_t num_buffers_allocation_threshold
 Defines the minimum number of required free buffers.
 
size_t num_buffers_free_threshold
 Defines the maximum number of free buffers.
 
size_t num_buffers_max
 Defines the maximum total number of buffers this sink will allocate.
 

Detailed Description

Specifies a custom allocation strategy.

Member Data Documentation

◆ num_buffers_allocation_threshold

size_t num_buffers_allocation_threshold

Defines the minimum number of required free buffers.

If the number of free buffers falls below this, new buffers are allocated.

◆ num_buffers_free_threshold

size_t num_buffers_free_threshold

Defines the maximum number of free buffers.

If the number of free buffers grows above this, buffers are freed.

If set to 0, buffers are not freed automatically.

Note
If num_buffers_free_threshold is not 0, it must be larger than num_buffers_allocation_threshold + 2.

◆ num_buffers_max

size_t num_buffers_max

Defines the maximum total number of buffers this sink will allocate.

This includes both free buffers managed by the sink and filled buffers owned by the program.

If set to 0, there is no limit to the total number of buffers.