Hi, All.
I used ramsize in syspage to determine a physical memory size but it
doen’t work in QNX6.3.
In syspage.h I found a notice “use asinfo section” but without
any explanations how to use it.
Can anybody explane how to determine size of physical memory in
QNX6.3?
–
Sergiy Uvarov
Hello, Sergiy!
SU> Can anybody explane how to determine size of physical memory in
SU> QNX6.3?
mig4nto, since 6.0 release
…\src\lib\mig4nto\qnx_osinfo.c:
static int
get_total_mem(void)
{
char *str = SYSPAGE_ENTRY(strings)->data;
struct asinfo_entry *as = SYSPAGE_ENTRY(asinfo);
int total = 0;
unsigned num;
for(num = _syspage_ptr->asinfo.entry_size / sizeof(*as); num > 0; --num) {
if(strcmp(&str[as->name], “ram”) == 0) {
total += as->end - as->start + 1;
}
++as;
}
return total;
}
Enjoy !
With best regards, Mike Gorchak. E-mail: mike@malva.com.ua