GeezerVison is showing github.com — v8::Isolate::GetCurrent()->IdleNotificationDeadline not working in 3.x (manual gc not working) · Issue #2478 · nodejs/node
v8::Isolate::GetCurrent()->IdleNotificationDeadline not working in 3.x (manual gc not working) #2478
Labels
c++Issues and PRs that require attention from people who are familiar with C++.v8 engineIssues and PRs related to the V8 dependency. Description
Hi there, I'm currently maintaining the node-memwatch package against latest iojs/nodejs versions, available as memwatch-next on npm.
I've noticed that with new v8 version 4.4.63.26 the IdleNotification does not trigger GC at all.
I'm using both NaN 2.0.5 and direct v8::Isolate::GetCurrent()->IdleNotificationDeadline call with 500ms, 1s and 5s.
The gc seems not to be executed. I can make it run successfully with --expose-gc flag through the global.gc() function.
Activity
marcominetti commented on Aug 20, 2015
example code (from memwatch):
NAN_METHOD(memwatch::trigger_gc) {
Nan::HandleScope scope;
while(!(v8::Isolate::GetCurrent()->IdleNotificationDeadline(0.500))) {};
//while(!Nan::IdleNotification(500)) {};
info.GetReturnValue().Set(Nan::Undefined());
}
bnoordhuis commented on Aug 20, 2015
Do you start iojs with --use_idle_notification? It's a complete no-op without that flag.
added
c++Issues and PRs that require attention from people who are familiar with C++. v8 engineIssues and PRs related to the V8 dependency. on Aug 20, 2015marcominetti commented on Aug 20, 2015
I supposed that flag was enabled by default... I'll try when back to the office.
Has been changed something in iojs 3.x? Everything works fine till 2.5.0 branch.
bnoordhuis commented on Aug 21, 2015
I take back what I said, I see that --use_idle_notification is on by default. Does v8::Isolate::IdleNotification() work?
marcominetti commented on Aug 21, 2015
Nope. Seems something not working in v8...
marcominetti commented on Aug 21, 2015
Should we suppose the strategy to call
while(!(v8::Isolate::GetCurrent()->IdleNotificationDeadline(0.500))) {};
is deprecated cause new IdleNotification implementation does not returns true as consistently as before?
kkoopa commented on Aug 21, 2015
That is probably a safe assumption. IIRC, there was never a guarantee of this triggering garbage collection. Only reliable way is by the functionality exposed with --expose-gc.
Fishrock123 commented on Aug 22, 2015
Closing unless there is actually something we can do about this and/or should. :)
Metadata
Metadata
c++Issues and PRs that require attention from people who are familiar with C++.v8 engineIssues and PRs related to the V8 dependency. Development
No branches or pull requestsIssue actions