Skip to content
Snippets Groups Projects
Commit c80c0c1e authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Clear only first header in RMA buffer.

parent e8620df7
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -97,7 +97,15 @@ modelWinFlushBuffer(size_t streamIdx)
xassert(streamIdx < numStreams && openStreams.entries[streamIdx] != CDI_UNDEFID && txWin != NULL
&& txWin[streamIdx].buffer != NULL);
memset(txWin[streamIdx].buffer, 0, txWin[streamIdx].size);
#if 0
/* for debugging purposes it might be smart to set the whole buffer
* to 0 */
size_t clearSize = txWin[streamIdx].size;
memset(txWin[streamIdx].buffer, 0, clearSize);
#else
/* but normally, setting the first header record to zero will
* suffice (see below) */
#endif
txWin[streamIdx].head = txWin[streamIdx].buffer + (size_t) txWin[streamIdx].dictSize * sizeof(struct winHeaderEntry);
txWin[streamIdx].refuseFuncCall = 0;
txWin[streamIdx].dictDataUsed = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment