Closed
Bug 297714
Opened 20 years ago
Closed 20 years ago
Memory cache should use PR_GetPhysicalMemorySize
Categories
(Core :: Networking: Cache, defect)
Core
Networking: Cache
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: darin.moz)
References
Details
Attachments
(1 file)
|
3.68 KB,
patch
|
darin.moz
:
review+
darin.moz
:
superreview+
asa
:
approval1.8b3+
|
Details | Diff | Splinter Review |
| Reporter | ||
Comment 1•20 years ago
|
||
Attachment #186258 -
Flags: superreview?(darin)
Attachment #186258 -
Flags: review?(darin)
| Assignee | ||
Comment 2•20 years ago
|
||
Comment on attachment 186258 [details] [diff] [review]
patch
>Index: nsCacheService.cpp
>+ PRUint64 bytes = PR_GetPhysicalMemorySize();
>
>+ if (bytes == 0) return 0;
nit: return on new line so a breakpoint can be set on return.
also, shouldn't this be comparing against LL_ZERO instead?
>+ // Conversion from unsigned int64 to double doesn't work on all platforms.
>+ // We need to truncate the value at LL_MAXINT to make sure we don't
>+ // overflow.
>+ if (LL_CMP(bytes, >, LL_MAXINT))
>+ bytes = LL_MAXINT;
>
>+ double bytesD;
>+ LL_L2D(bytesD, (PRInt64) bytes);
>
>+ double x = log(bytesD)/log((double)2) - 14;
nit: "2.0" instead of "(double)2"
otherwise, it looks good.
Attachment #186258 -
Flags: superreview?(darin)
Attachment #186258 -
Flags: superreview+
Attachment #186258 -
Flags: review?(darin)
Attachment #186258 -
Flags: review+
| Reporter | ||
Comment 3•20 years ago
|
||
Comment on attachment 186258 [details] [diff] [review]
patch
Requesting approval for 1.8b3. This is pretty safe, as we're just moving
functionality into NSPR.
Attachment #186258 -
Flags: approval1.8b3?
Updated•20 years ago
|
Attachment #186258 -
Flags: approval1.8b3? → approval1.8b3+
| Reporter | ||
Comment 4•20 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
This caused a large Tp drop on btek. Was it supposed to? It doesn't look like
it was.
| Assignee | ||
Comment 6•20 years ago
|
||
Yikes! That seems to suggest that the memory cache size might have increased in
size unexpectedly.
You need to log in
before you can comment on or make changes to this bug.
Description
•