iceoryx
iceoryx copied to clipboard
MemoryManager should not call errorHandler when the requested chunk size is too large
Required information
When acquiring a too large chunk via the publisher so that no mempool is available the memory manager calls the error handler despite having a fitting enum value to return - AllocationError::RUNNING_OUT_OF_CHUNKS
.
Maybe we could also add a new enum value called AllocationError::CHUNK_SIZE_TOO_LARGE
and return this to the user. There is no need to call the error handler.
We already return an error enum instead of a call to the errorHandler when running out of chunks so we should be consistent.
@elfenpiff this comes from a code base which was created before we had the expected
and it seems afterwards we decided that if we are never able to return a chunk it would be best to just terminate. Maybe it's not the best option nowadays.
@elfenpiff according to the code we already have an error code for a request for a chunk which is larger than any available mempool can hold.
I would argue that it is a programming error when such a chunk is requested since it will never succeed. I would keep the behavior as is and close the issue. What do you think?
We keep the current behavior