oms_buffer_pk_pool_create()
Abstract
Creates a new memory pool to manage packets of bytes.
Syntax
oms_buffer_pk_pool_create (max_bytes, max_packets, insert_proc, pool_stats, pool_name, user_data_ptr, status_ptr)
| Argument | Type | Description |
|---|---|---|
max_bytes |
double |
maximum number of bytes that can be held by this pool |
max_packets |
double |
maximum number of packets that can be held by this pool |
insert_proc |
OmsT_Buffer_Insertion_Criteria_Proc |
function invoked whenever a new packet is added to a buffer of the pool |
pool_stats |
OmsT_Buffer_Stats * |
array of statistic handles |
pool_name |
const char * |
name associated with the pool for ODB tracing |
user_data_ptr |
void * |
arbitrary user data associated with the pool |
status_ptr |
OmsT_Buffer_Create * |
indicator of the success or failure (with reason) of the creation of this new pool |
Return Type
OmsT_Buffer_Pool_Handle
Created pool object or OPC_NIL if the operation failed.
Details
This function is a specialized version of oms_buffer_pool_create(), in which elements are packets and units are bytes. The automatically specified arguments of oms_buffer_pk_pool_create() are
- size_proc: set to a function using op_pk_total_size_get()
- destroy_proc: set to a function using op_pk_destroy()
- trace_proc: set to a function returning a string containing the packet ID
- the ODB tracing strings are set to “packet”, “packets”, “byte”, and “bytes”
See Buffer and Pool Creation and the Details section of oms_buffer_pool_create() for further background.