Skip to content

Commit

Permalink
don't be too perf-greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 28, 2018
1 parent b2612cb commit 95b19bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
}

// For simplicities' sake, we implement reallocate as "alloc, copy, dealloc".
// FIXME: Do something more efficient.
// This happens so rarely, the perf advantage is outweighed by the maintenance cost.
let new_ptr = self.allocate(new_size, new_align, kind)?;
self.copy(
ptr.into(),
Expand Down

0 comments on commit 95b19bb

Please sign in to comment.