I am trying to reduce latency for exchanging data between host and target via PINNED COIBuffers. Based on the description provided in the header file, PINNED buffers use shared memory so I am assuming they may provide the least overhead.
The problem I am running into is that my call to create even one such 32K buffer fails - the following call returns COI_RESOURCE_EXHAUSTED even after target has been freshly restarted:
status = COIBufferCreate(
kTransferSegmentSize, // Buffer size (32K)
COI_BUFFER_PINNED, // Allocate a "pinned" buffer type
0, // No flags
NULL, // No initial value
1, // Number of processes where buffer will be used
&gTargetPids[target], // Array of process handles
gTransferBuffers+i // Output handle for the buffer
Is this behavior expected? If yes, is there a way of allocating a shared-memory buffer that can be directly written/read from the host/target without any additional involvement from the host/target SW stack.
Any help would be appreciated :-)