We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72b5a1c commit 8888443Copy full SHA for 8888443
capnp/src/private/arena.rs
@@ -167,10 +167,17 @@ pub trait BuilderArena: ReaderArena {
167
fn as_reader(&self) -> &dyn ReaderArena;
168
}
169
170
+/// A wrapper around a memory segment used in building a message.
171
struct BuilderSegment {
172
+ /// Pointer to the start of the segment.
173
ptr: *mut u8,
- capacity: u32, // in words
- allocated: u32, // in words
174
+
175
+ /// Total number of words the segment could potentially use. That is, all
176
+ /// bytes from `ptr` to `ptr + (capacity * 8)` may be used in the segment.
177
+ capacity: u32,
178
179
+ /// Number of words already used in the segment.
180
+ allocated: u32,
181
182
183
pub struct BuilderArenaImplInner<A>
0 commit comments