Resolve review comments.

This commit is contained in:
losfair 2020-03-04 01:56:48 +08:00
parent d443ad8d40
commit d9e744d9dc

View File

@ -48,6 +48,8 @@ struct TrampBuffer {
/// The allocation state of a `TrampBuffer`.
struct AllocState {
/// Records all allocated blocks in `buffer`.
///
/// Maps the start address of each block to its end address.
blocks: BTreeMap<usize, usize>,
}
@ -103,8 +105,6 @@ impl TrampBuffer {
if self.buffer.len() - assumed_start < buf.len() {
// No more free space. Cannot allocate.
return None;
} else {
// Extend towards the end.
}
}