Skip to content

Commit

Permalink
remove self.zero_segment_index.is_zero() check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Fontana authored and Pedro Fontana committed Aug 7, 2024
1 parent b758d93 commit aa8f658
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions vm/src/vm/vm_memory/memory_segments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,11 @@ impl MemorySegmentManager {
}
let accessed_amount =
// Instead of marking the values in the zero segment until zero_segment_size as accessed we use zero_segment_size as accessed_amount
if !self.zero_segment_index.is_zero() && i == self.zero_segment_index {
self.zero_segment_size
} else {
match self.memory.get_amount_of_accessed_addresses_for_segment(i) {
Some(accessed_amount) if accessed_amount > 0 => accessed_amount,
_ => continue,
}
};
};

let segment_size = self
.get_segment_size(i)
.ok_or(MemoryError::MissingSegmentUsedSizes)?;
Expand Down

0 comments on commit aa8f658

Please sign in to comment.