getting total physical memory
getting total physical memory
- Subject: getting total physical memory
- From: Alex Reynolds <email@hidden>
- Date: Sun, 17 Nov 2002 23:32:18 -0500
I am trying to get the total amount of system memory into a value I can
use.
I have the following imports in my header:
#import <mach/mach.h>
#import <mach/host_info.h>
and I am trying to declare the following struct pointer variable, as
indicated by host_info.h:
host_basic_info_t hostinfo;
I want to use:
hostinfo.memory_size
which the documentation says will return the system memory in bytes,
probably as a long or double long.
The documents at
http://www.gnu.org/software/hurd/gnumach-doc/mach_8.html say that
memory_size is part of the host_basic_info structure, but when I
compile my program with a line that refers to hostinfo.memory_size, I
get the following error:
"request for member 'memory_size' in something not a structure or
union"
Does anyone know how to pull the system memory into a variable? Am I
importing and referencing the wrong header?
Thanks,
Alex
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.