Clarify error message for channel with too small a max_size
The old one was misleading.
Change-Id: I79e5d18f83c0316c6f281fdc95188acc8278bae2
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/events/channel_preallocated_allocator.h b/aos/events/channel_preallocated_allocator.h
index c4f0eca..76fb694 100644
--- a/aos/events/channel_preallocated_allocator.h
+++ b/aos/events/channel_preallocated_allocator.h
@@ -62,11 +62,12 @@
uint8_t *reallocate_downward(uint8_t * /*old_p*/, size_t /*old_size*/,
size_t new_size, size_t /*in_use_back*/,
size_t /*in_use_front*/) override {
- LOG(FATAL) << "Requested " << new_size << " bytes, max size "
- << channel_->max_size() << " for channel "
- << configuration::CleanedChannelToString(channel_)
- << ". Increase the memory reserved to at least " << new_size
- << ".";
+ LOG(FATAL)
+ << "Requested " << new_size
+ << " bytes (includes extra for room to grow even more), max size "
+ << channel_->max_size() << " for channel "
+ << configuration::CleanedChannelToString(channel_)
+ << ". Increase the memory reserved to at least " << new_size << ".";
return nullptr;
}