implement nsMemoryImpl::IsLowMemory() predicate for Linux

NEW
Unassigned

Status

()

Core
XPCOM
P3
normal
18 years ago
5 years ago

People

(Reporter: Chris Waterson, Unassigned)

Tracking

({embed, memory-footprint})

Trunk
mozilla2.0
x86
Linux
embed, memory-footprint
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
Need to implement this to make memory flusher thread do useful stuff.
(Reporter)

Updated

18 years ago
Blocks: 44352
Keywords: footprint

Comment 1

18 years ago
There was a thread about this on n.p.m.porkjockeys and .unix.
See the thread "hitting the wall" in .unix;
<news://news.mozilla.org/8nfg5u%24l804%40secnews.netscape.com> and
its follow-ups.

Short summary:
* It's not clear what "Low Memory" means on a multi-user, virtual-memory
machine.  Possibilities include % of virtual memory in use, % of real memory in
use, % of user memory, % of getrlimit settings(), or (on AIX) receipt of the
SIGDANGER signal.

* Once you decide what Low Memory means, determining it portably between various
Unixes is very hard.  Effectively, every Unix system defines its own API for
doing this.

* Some Unix implementations require that a process be setuid or setgid kmem in
order to read the kernel structures giving memory-usage information.

* Examples of programs which do this are top (the classic portable
load-monitoring program, <http://www.groupsys.com/top/>) and libgtop (A more
modern architecture indended for use with GNOME,
<http://www.home-of-linux.org/gnome/libgtop/>).  The former program is not
exactly modular, though, and the latter is under a strict-GPL, so neither is
incorporatable into Mozilla; however, code inspiration should be drawable from
them.
(Reporter)

Updated

18 years ago
Status: NEW → ASSIGNED
Target Milestone: --- → Future
(Reporter)

Comment 2

18 years ago
add embed kw
Keywords: embed
Assignee: waterson → nobody
Status: ASSIGNED → NEW
QA Contact: rayw → xpcom

Updated

9 years ago
Priority: P3 → P2
Target Milestone: Future → mozilla1.9.3
Target Milestone: mozilla1.9.3 → mozilla2.0

Updated

5 years ago
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.