Closed
Bug 508610
Opened 15 years ago
Closed 15 years ago
Need an GCHeap config variable where a client can set a soft heap limit
Categories
(Tamarin Graveyard :: Garbage Collection (mmGC), defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: treilly, Assigned: treilly)
References
Details
Attachments
(1 file)
4.26 KB,
patch
|
lhansen
:
superreview+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•15 years ago
|
||
The idea is when we hit this point we go from kMemNormal to kMemReserve and when we drop below this limit we can go back to kMemNormal.
Questions: to we send an additional kMemReserve message when memory runs out? Idea is we want to do another GC at that point where we can
This soft limit should be runtime variable that the client can change, idea is that if the OS signal's memory is low before we get to the soft limit the program can lower the soft limit to the current heap size.
Summary: Need to free a certain percentage of heap before going from kMemReserve->kMemNormal → Need an GCHeap config variable where a client can set a soft heap limit
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #396284 -
Flags: superreview?(lhansen)
Updated•15 years ago
|
Attachment #396284 -
Flags: superreview?(lhansen) → superreview+
Comment 3•15 years ago
|
||
Comment on attachment 396284 [details] [diff] [review]
Adds soft limit and centralizes kMemNormal transition checking
The second test in CheckForStatusReturnToNormal appears to be wrong. Let p be the peak number of blocks and s be the current number of blocks. The test is currently
10p < 9s
that is
10/9 p < s
which is to say, current must be greater than peak which is absurd. Switching the 10 and the 9 around gives you
9/10 p < s
which sounds better, but that's still the wrong test: you want the opposite of that,
9/10 p > s.
All that said, this check sounds ad-hoc and I'm not sure what the motivation is. Do you have data or anything else to back it up with?
As a style recommendation, I see there are a couple of places where combinations of flags are being tested - it might be useful to encapsulate these as named tests (inline functions) and just reference them, eg, inLowMemoryStatus() would test for kMemReserve || kMemSoftLimit.
R+ but with the proviso that the buggy 10% computation is fixed or removed, and backed up with more data/evidence/reasoning if not removed.
Assignee | ||
Comment 4•15 years ago
|
||
Cool, yeah in the latest version of this in the player that test was fixed by the people who are relying on the soft limit stuff. +1 on the meaningful inlines too
Assignee | ||
Comment 5•15 years ago
|
||
changeset: 2439:0d25988a326d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•