Status: New
Owner: ----

New issue 1669 by [email protected]: LowMemoryNotify isn't as effective as it should be.
http://code.google.com/p/v8/issues/detail?id=1669

The point of calling LowMemoryNotification is that the platform is low on memory (as in: if we don't free memory, the kernel will start killing processes soon) and would like V8 to reclaim as much memory as possible, and although we're concerned about how much effort it takes, we're OK if it takes some effort as long as it gets us some memory.

It seems odd to me that calling LowMemoryNotification is less effective at freeing memory than calling IdleNotification in a loop until it returns true, because of object references that require multiple GCs to get rid of, and because of the various other things that IdleNotification will do if called enough times.

Shouldn't LowMemoryNotification do anything and everything it can to free memory, even if it is somewhat costly? Ideally I think it would do the same thing as calling IdleNotification in a loop, but without all the "how many times have we done this?" logic and without any extra calls to GC.

As a user of the V8 API, I'd rather call the thing that should do what I want semantically (LowMemoryNotification) instead of trying to trick V8 into doing the "right thing" (calling IdleNotification repeatedly) based on the current implementation.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to