Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: getting total memory size on OSX?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting total memory size on OSX?



using sysctlbyname to get hw.physmem will not work on systems with more than 2GB of ram (it returns a signed int)

use hw.memsize instead:


uint64_t mem; size_t len = sizeof(mem);

sysctlbyname("hw.memsize", &mem, &len, NULL, 0);



On Aug 3, 2005, at 11:07 AM, Ron Chen wrote:

Currently, Gridengine uses host_info() to get the
memory_size.

However, sizeof(host_basic_info.memory_size) is 4, so
for machines with 4GB of memory or more, is there a
better call the get the memory size?

I've tried sysctlbyname():
http://gridengine.sunsource.net/servlets/ReadMsg? list=users&msgNo=12099


 -Ron





____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Scitech mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >getting total memory size on OSX? (From: Ron Chen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.