Initialize slice.next to be "unset". This should not be necessary in most
cases, but reduces the probability that a half-made writeable entry cannot be
freed properly because it contains an invalid slice.next value.
Losing the bit to store ID sign is not a big deal: Since slices always contain
non-trivial number of bytes for metadata, it is unlikely that all 32 (but less
than 33) bits would be required to store slice IDs in the future.
namespace Ipc
{
-typedef uint32_t StoreMapSliceId;
+typedef int32_t StoreMapSliceId;
/// a piece of Store entry, linked to other pieces, forming a chain
class StoreMapSlice
{
public:
- StoreMapSlice(): next(0), size(0) {}
+ StoreMapSlice(): next(-1), size(0) {}
StoreMapSliceId next; ///< ID of the next slice occupied by the entry
uint32_t size; ///< slice contents size