diff options
author | Vic Yang <victoryang@google.com> | 2019-09-05 13:18:27 -0700 |
---|---|---|
committer | Vic Yang <victoryang@google.com> | 2019-09-05 13:19:14 -0700 |
commit | 9fb93edd5bd4531f72faadfb269a0aa25d413b5d (patch) | |
tree | 72e8c274e883d168e1be903d69d0da6bb98866e6 /libutils/SharedBuffer.h | |
parent | 8bea425845ce232c272d8adc9e3149d49ba91a6f (diff) |
Reland "libutils: Introduce StaticString16""
This reverts commit 1270e4fbf17402fb01dbfa7928a654d41d8553ee.
Bug: 138856262
Test: Run unit tests.
Change-Id: I37be01d7d4f98a83078870cb0917275336fa2bbd
Merged-In: I8da93f2c9b95183e32d4a2ea895f90c449abbe4d
Diffstat (limited to 'libutils/SharedBuffer.h')
-rw-r--r-- | libutils/SharedBuffer.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libutils/SharedBuffer.h b/libutils/SharedBuffer.h index fdf13a9e7..476c842fe 100644 --- a/libutils/SharedBuffer.h +++ b/libutils/SharedBuffer.h @@ -102,7 +102,12 @@ private: // Must be sized to preserve correct alignment. mutable std::atomic<int32_t> mRefs; size_t mSize; - uint32_t mReserved[2]; + uint32_t mReserved; +public: + // mClientMetadata is reserved for client use. It is initialized to 0 + // and the clients can do whatever they want with it. Note that this is + // placed last so that it is adjcent to the buffer allocated. + uint32_t mClientMetadata; }; static_assert(sizeof(SharedBuffer) % 8 == 0 |