Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: nspr/pr/src/misc/prsystem.c

Issue 407383002: Update to NSPR 4.10.7 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nspr/pr/src/md/windows/w95io.c ('k') | nspr/pr/src/pthreads/ptio.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nspr/pr/src/misc/prsystem.c
diff --git a/nspr/pr/src/misc/prsystem.c b/nspr/pr/src/misc/prsystem.c
index 9579fcc931f1cb0a35ffbc9fa961163b3a022fa7..7a250713a6832327ef55e6019a8d5942f1ce1ba9 100644
--- a/nspr/pr/src/misc/prsystem.c
+++ b/nspr/pr/src/misc/prsystem.c
@@ -33,6 +33,7 @@
#if defined(DARWIN)
#include <mach/mach_init.h>
#include <mach/mach_host.h>
+#include <mach/mach_port.h>
#endif
#if defined(HPUX)
@@ -297,13 +298,15 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMemorySize(void)
#elif defined(DARWIN)
+ mach_port_t mach_host = mach_host_self();
struct host_basic_info hInfo;
mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
- int result = host_info(mach_host_self(),
+ int result = host_info(mach_host,
HOST_BASIC_INFO,
(host_info_t) &hInfo,
&count);
+ mach_port_deallocate(mach_task_self(), mach_host);
if (result == KERN_SUCCESS)
bytes = hInfo.max_mem;
« no previous file with comments | « nspr/pr/src/md/windows/w95io.c ('k') | nspr/pr/src/pthreads/ptio.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698