Closed
Bug 668137
Opened 13 years ago
Closed 13 years ago
Add vsize to about:memory on Windows
Categories
(Toolkit :: General, defect)
Tracking
()
VERIFIED
FIXED
mozilla7
People
(Reporter: justin.lebar+bug, Assigned: justin.lebar+bug)
Details
(Whiteboard: [inbound])
Attachments
(2 files)
3.15 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
947 bytes,
patch
|
Details | Diff | Splinter Review |
Per bug 664291, we can call GlobalMemoryStatusEx, which gives us * ullTotalVirtual - total amount of virtual memory available to a userspace process on this machine (usually 2G on 32-bit systems, but sometimes 3G) * ullAvailVirtual - amount of virtual address space the current process has left. Subtracting these two values gives us vsize.
Assignee | ||
Comment 1•13 years ago
|
||
> Per bug 664291 er, bug 664291 comment 32.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → justin.lebar+bug
Assignee | ||
Updated•13 years ago
|
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #542935 -
Flags: review?(nnethercote)
Comment 3•13 years ago
|
||
Comment on attachment 542935 [details] [diff] [review] Patch v1 Review of attachment 542935 [details] [diff] [review]: -----------------------------------------------------------------
Attachment #542935 -
Flags: review?(nnethercote) → review+
Comment 4•13 years ago
|
||
Backed out of -inbound in http://hg.mozilla.org/integration/mozilla-inbound/rev/6777320f6f29, OS X says nsMemoryReporterManager.cpp g++-4.2 -o nsMemoryReporterManager.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Darwin9.2.0\" -DOSARCH=Darwin -D_IMPL_NS_COM -I/builds/slave/inbound-osx-dbg/build/xpcom/base/../build -I/builds/slave/inbound-osx-dbg/build/xpcom/base -I. -I../../dist/include -I../../dist/include/nsprpub -I/builds/slave/inbound-osx-dbg/build/obj-firefox/dist/include/nspr -I/builds/slave/inbound-osx-dbg/build/obj-firefox/dist/include/nss -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -isysroot /Developer/SDKs/MacOSX10.5.sdk -fno-strict-aliasing -fno-common -fshort-wchar -pthread -DNO_X11 -pipe -DDEBUG -D_DEBUG -DTRACING -gdwarf-2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/nsMemoryReporterManager.pp /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp: In member function 'virtual nsresult nsMemoryReporterManager::Init()': /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp:418: error: expected type-specifier before 'MemoryReporter_Vsize' /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp:418: error: expected `)' before 'MemoryReporter_Vsize' /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp:418: error: no matching function for call to 'nsMemoryReporterManager::RegisterReporter(int*)' /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.h:37: note: candidates are: virtual nsresult nsMemoryReporterManager::RegisterReporter(nsIMemoryReporter*) /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.h: In constructor 'nsMemoryReporter::nsMemoryReporter(nsCString&, nsCString&, PRInt32, PRInt32, PRInt64, nsCString&)': /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.h:29: warning: 'nsMemoryReporter::mDesc' will be initialized after /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.h:28: warning: 'PRInt64 nsMemoryReporter::mAmount' /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp:517: warning: when initialized here /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp: At global scope: /builds/slave/inbound-osx-dbg/build/xpcom/base/nsMemoryReporterManager.cpp:118: warning: 'PRInt64 GetVsize()' defined but not used make[6]: *** [nsMemoryReporterManager.o] Error 1
Assignee | ||
Comment 5•13 years ago
|
||
Of course it doesn't compile on the one platform I didn't test. This inbound thing works great. :)
Assignee | ||
Comment 6•13 years ago
|
||
It stuck this time on inbound (original bug was "MACOS" instead of "MACOSX"). http://hg.mozilla.org/integration/mozilla-inbound/rev/72b3e5161578
Whiteboard: [inbound]
Version: unspecified → 7 Branch
Assignee | ||
Updated•13 years ago
|
Version: 7 Branch → Trunk
Comment 7•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/72b3e5161578
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Comment 8•13 years ago
|
||
Comment on attachment 542935 [details] [diff] [review] Patch v1 Review of attachment 542935 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/base/nsMemoryReporterManager.cpp @@ +140,5 @@ > + bool success = GlobalMemoryStatusEx(&s); > + if (!success) > + return -1; > + > + return s.ullTotalPhys - s.ullAvailPhys; Shouldn't this be using the *Virtual equivalents instead of the system wide physical stats? ie. return s.ullTotalVirtual - s.ullAvailVirtual;
Assignee | ||
Comment 9•13 years ago
|
||
> Shouldn't this be using the *Virtual equivalents instead of the system wide
> physical stats?
Hm, yes. That's kind of embarrassing!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 10•13 years ago
|
||
This has r=khuey over IRC.
Assignee | ||
Comment 11•13 years ago
|
||
Followup landed on m-c, before the Aurora merge. Thanks for pointing this out, James! http://hg.mozilla.org/mozilla-central/rev/821b5076d2c0
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 12•13 years ago
|
||
Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0 Verified as fixed on WinXP: vsize was added to about:memory page. Setting resolution to VERIFIED-FIXED.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•