mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-28 17:41:20 +00:00
Resolve review comments.
This commit is contained in:
parent
d443ad8d40
commit
d9e744d9dc
@ -48,6 +48,8 @@ struct TrampBuffer {
|
|||||||
/// The allocation state of a `TrampBuffer`.
|
/// The allocation state of a `TrampBuffer`.
|
||||||
struct AllocState {
|
struct AllocState {
|
||||||
/// Records all allocated blocks in `buffer`.
|
/// Records all allocated blocks in `buffer`.
|
||||||
|
///
|
||||||
|
/// Maps the start address of each block to its end address.
|
||||||
blocks: BTreeMap<usize, usize>,
|
blocks: BTreeMap<usize, usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,8 +105,6 @@ impl TrampBuffer {
|
|||||||
if self.buffer.len() - assumed_start < buf.len() {
|
if self.buffer.len() - assumed_start < buf.len() {
|
||||||
// No more free space. Cannot allocate.
|
// No more free space. Cannot allocate.
|
||||||
return None;
|
return None;
|
||||||
} else {
|
|
||||||
// Extend towards the end.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user