| 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;
|
|
|
|
|