Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Svc/BufferManager/BufferManagerComponentImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ namespace Svc {
// make sure component has been set up
FW_ASSERT(this->m_setup);
FW_ASSERT(m_buffers);
// check for empty buffers - this is just a warning since this component returns
// empty buffers if it can't allocate one.
if (fwBuffer.getSize() == 0) {
this->log_WARNING_HI_ZeroSizeBuffer();
// check for null, empty buffers - this is a warning because this component returns
// null, empty buffers if it can't allocate one.
// however, empty non-null buffers could potentially be previously allocated
// buffers with their size reduced. the user is allowed to make buffers smaller.
if (fwBuffer.getData() == nullptr && fwBuffer.getSize() == 0) {
this->log_WARNING_HI_NullEmptyBuffer();
this->m_emptyBuffs++;
return;
}
Expand Down
6 changes: 3 additions & 3 deletions Svc/BufferManager/Events.fppi
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ event NoBuffsAvailable(
format "No available buffers of size {}" \
throttle 10

@ The buffer manager received a zero-sized buffer as a return. Probably undetected empty buffer allocation
event ZeroSizeBuffer \
@ The buffer manager received a null pointer and zero-sized buffer as a return. Probably undetected failed buffer allocation
event NullEmptyBuffer \
severity warning high \
id 0x01 \
format "Received zero size buffer" \
format "Received null pointer and zero size buffer" \
throttle 10
Loading