Fix problems caused by alignment.
The message was getting padded out to match alignment. This was
triggering the size that the user asked for to not match the size of the
message. These extra bytes were then getting coppied back into fetchers
and such.
We have 2 choices.
1) Waste the bytes at the end and keep the contract.
2) Modify the contract so that shm can store more bytes.
2) breaks the abstraction too much and causes too much change for a
negligable increase in storage, which pushes us to 1)
Change-Id: Idb3c79c93a7b7592628522b4304073f64bb06a2a
diff --git a/aos/ipc_lib/lockless_queue.h b/aos/ipc_lib/lockless_queue.h
index 4a8523b..d539386 100644
--- a/aos/ipc_lib/lockless_queue.h
+++ b/aos/ipc_lib/lockless_queue.h
@@ -83,7 +83,7 @@
// Size in bytes of the data stored in each Message.
size_t message_data_size;
- size_t message_size() const { return message_data_size + sizeof(Message); }
+ size_t message_size() const;
size_t num_messages() const { return num_senders + queue_size; }
};