aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoravz <a.arepo@gmail.com>2011-06-26 00:30:23 -0700
committerPaul Querna <pquerna@apache.org>2011-07-06 21:52:21 -0700
commitcc834555347c38dd07d798f2f28fda0937142baa (patch)
treecfaea8f4510d81beae769749af1e6437d5bc7ec2 /src
parent3dbb3cdb6abcc3916ed6fa02e08e4759fc09cc6a (diff)
downloadandroid-node-v8-cc834555347c38dd07d798f2f28fda0937142baa.tar.gz
android-node-v8-cc834555347c38dd07d798f2f28fda0937142baa.tar.bz2
android-node-v8-cc834555347c38dd07d798f2f28fda0937142baa.zip
sysctl(CTL_HW, HW_PHYSMEM) always returns unsigned long. Will work fine for 32 and 64 bit systems. Closes #1233.
Diffstat (limited to 'src')
-rw-r--r--src/platform_freebsd.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/platform_freebsd.cc b/src/platform_freebsd.cc
index 1377250f34..7037f11eae 100644
--- a/src/platform_freebsd.cc
+++ b/src/platform_freebsd.cc
@@ -181,13 +181,9 @@ double Platform::GetFreeMemory() {
}
double Platform::GetTotalMemory() {
-#if defined(HW_PHYSMEM64)
- uint64_t info;
- static int which[] = {CTL_HW, HW_PHYSMEM64};
-#else
- unsigned int info;
+ unsigned long info;
static int which[] = {CTL_HW, HW_PHYSMEM};
-#endif
+
size_t size = sizeof(info);
if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {