Revision: 22867
Author: [email protected]
Date: Tue Aug 5 12:09:23 2014 UTC
Log: Precise sweeping makes zapping of garbage memory when trimming
arrays obsolete
BUG=
[email protected]
Review URL: https://codereview.chromium.org/439863006
http://code.google.com/p/v8/source/detail?r=22867
Modified:
/branches/bleeding_edge/src/heap/heap.cc
=======================================
--- /branches/bleeding_edge/src/heap/heap.cc Tue Aug 5 11:16:11 2014 UTC
+++ /branches/bleeding_edge/src/heap/heap.cc Tue Aug 5 12:09:23 2014 UTC
@@ -3258,15 +3258,6 @@
}
}
}
-
-
-static void ZapFixedArrayForTrimming(Address address, int
elements_to_trim) {
- Object** zap = reinterpret_cast<Object**>(address);
- zap++; // Header of filler must be at least one word so skip that.
- for (int i = 1; i < elements_to_trim; i++) {
- *zap++ = Smi::FromInt(0);
- }
-}
FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
@@ -3290,15 +3281,6 @@
// Calculate location of new array start.
Address new_start = object->address() + bytes_to_trim;
-
- if (bytes_to_trim > FreeSpace::kHeaderSize &&
- object->IsFixedArray() &&
- !new_space()->Contains(object)) {
- // If we are doing a big trim in old space then we zap the space that
was
- // formerly part of the array so that the GC (aided by the card-based
- // remembered set) won't find pointers to new-space there.
- ZapFixedArrayForTrimming(object->address(), elements_to_trim);
- }
// Technically in new space this write might be omitted (except for
// debug mode which iterates through the heap), but to play safer
@@ -3347,15 +3329,6 @@
// Calculate location of new array end.
Address new_end = object->address() + object->Size() - bytes_to_trim;
-
- if (bytes_to_trim > FreeSpace::kHeaderSize &&
- object->IsFixedArray() &&
- (mode != Heap::FROM_GC || Heap::ShouldZapGarbage())) {
- // If we are doing a big trim in old space then we zap the space that
was
- // formerly part of the array so that the GC (aided by the card-based
- // remembered set) won't find pointers to new-space there.
- ZapFixedArrayForTrimming(new_end, elements_to_trim);
- }
// Technically in new space this write might be omitted (except for
// debug mode which iterates through the heap), but to play safer
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.