Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining physical memory size from c library



On 2005-10-05 15:02, Daniel Quinlan said:

>I would like to get the physical memory size on a Mac with some call to
>a c routine, on both Panther and TIger.  I have been
>using sysctl with HW_PHYSMEM, but this returns a size in bytes in a 4
>byte integer, which doesn't work well with 8 Gbytes
>of memory.  I think there's some function named Gestalt, but I haven't
>found documentation nor the link line necessary
>to use this.

Open Xcode, go to the Help menu, choose Documentation, type Gestalt in
the search box.  You'll want to use the
gestaltPhysicalRAMSizeInMegabytes selector.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden

References: 
 >Obtaining physical memory size from c library (From: Daniel Quinlan <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.