Skip to content

Commit 207c6ed

Browse files
committed
expand documentation of Allocator::deallocate_segment()
1 parent b736f2b commit 207c6ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

capnp/src/message.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ pub unsafe trait Allocator {
288288

289289
/// Indicates that a segment, previously allocated via allocate_segment(), is no longer in use.
290290
/// `word_size` is the length of the segment in words, as returned from `allocate_segment()`.
291+
/// `words_used` is always less than or equal to `word_size`, and indicates how many
292+
/// words (contiguous from the start of the segment) were possibly written with non-zero values.
291293
fn deallocate_segment(&mut self, ptr: *mut u8, word_size: u32, words_used: u32);
292294
}
293295

0 commit comments

Comments
 (0)