Status: Untriaged
Owner: ----
New issue 4201 by [email protected]: ArrayBuffer external memory not freed
during mark-sweep
https://code.google.com/p/v8/issues/detail?id=4201
Version: 4.4.63.8 but seems to be present in HEAD as well
OS: Linux
Architecture: x64
See test case here:
https://github.com/nodejs/io.js/pull/2022#issuecomment-113769435
Repeatedly calling `var buffer = new ArrayBuffer(64 * 1024);` triggers
mark-sweep cycles that reclaim ArrayBuffer objects in the new space without
calling ArrayBuffer::Allocator::Free(). RSS grows rapidly and never goes
down.
When you change the test to trigger scavenges instead (the test does it by
slicing a large array), ArrayBuffer::Allocator::Free() is called and RSS
remains stable.
I looked into it briefly and I managed to make it work (what's in a name)
with the small patch below. It passes `make x64.release.quickcheck` and
`make test` in io.js but I doubt it's actually correct.
diff --git a/deps/v8/src/heap/mark-compact.cc
b/deps/v8/src/heap/mark-compact.cc
index 5b29c21..e6cf151 100644
--- a/deps/v8/src/heap/mark-compact.cc
+++ b/deps/v8/src/heap/mark-compact.cc
@@ -4468,6 +4468,7 @@ void MarkCompactCollector::SweepSpaces() {
EvacuateNewSpaceAndCandidates();
+ heap()->FreeDeadArrayBuffers(true);
heap()->FreeDeadArrayBuffers(false);
// ClearNonLiveReferences depends on precise sweeping of map space to
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.