This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Determining Physical and Virtual Memory At Runtime In C


Hi,
Can anyone point me in the direction on a relatively
simple way to determine the amount of physical memory
and virtual memory available on a system at runtime? 
I'd like to be able to determine each value
independently, not the sum of both (total available
memory).  

I'd like to differentiate between the two in a c
program (gcc 4) in x86_64 linux (although that
shouldn't matter).  

Memalloc works fine, but performance slows down if
large arrays allocate in the upper paging file memory.
 I'd like to be able to split up calculations relative
to the available memory results returned.

Any help would be greatly appreciated.

Thanks,
Jonathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]