Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop ignoring real buffers shrunk to 0 size #3157

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
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
8 changes: 5 additions & 3 deletions Svc/BufferManager/BufferManagerComponentImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ 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) {
// 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) {
bocchino marked this conversation as resolved.
Show resolved Hide resolved
this->log_WARNING_HI_ZeroSizeBuffer();
LeStarch marked this conversation as resolved.
Show resolved Hide resolved
this->m_emptyBuffs++;
return;
Expand Down
Loading