W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2011

[whatwg] Low Memory Event

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Sat, 1 Jan 2011 16:35:05 -0800
Message-ID: <AANLkTim6ux1_JtCz_rDs7sao3Wg3HrocDGK8c8fCOnck@mail.gmail.com>
On Sat, Jan 1, 2011 at 2:04 PM, Charles Pritchard <chuck at jumis.com> wrote:
> It's the same concept, a memory warning.
>  On Sat, Jan 1, 2011 at 3:39 PM, Charles Pritchard<chuck at jumis.com>
>>  wrote:
>>> Here are some example implementations; it's up to the vendor, not the
>>> spec.
>>> Tabbed browsing implementation:
>>> Send a lowmemory event to hidden tabs listening (for lowmemory), that
>>> have
>>> not been visible for more than 60 seconds.
>>> (This is a partial example, as it doesn't detail when the tabs would be
>>> checked for visibility. )
>> An event like this needs to have a consistent meaning to allow
>> applications to respond meaningfully.  If it has varied meanings--or
>> if it has attributes to indicate each meaning, but they don't get
>> implemented in practice, or are too generic and don't accurately
>> describe the situation on each platform and configuration--then
>> applications can't respond correctly.
> It has a consistent meaning, again, though, we're talking about whether
> it's a semantic meaning or a technical one.
> The technical meaning, "we can't allocate memory" isn't something that can
> be used on every platform, per Boris' comments.
> The semantic meaning is pretty straightforward: low memory warning.
> It's really up to the author to decide what they want to do with a low
> memory warning,
> and up to the vendor to decide if they want to send one out.
> Anything else seems to be impractical.

What I don't understand about this proposal is how web apps are supposed to
free memory.  In my understanding, ES5 doesn't allow you to manually free
memory (unlike Objective-C), and it's up to GC implementor to decide how and
when (most of) resources are freed.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20110101/3b447fc2/attachment.htm>
Received on Saturday, 1 January 2011 16:35:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC