Mail Archives: djgpp/1994/11/03/18:45:07
Hi,
I have been writing some simple utilities that operate on our large
Radar data sets. Supposing I have a data set of 100Meg and a 32 meg
RAM machine, I currently allocate an array 25 meg large, read in
25meg of the data, operate on it, write it out, and read in the next
25 meg and so on...
The reason why I don't read in the entire data set is because then
GnuC begins swapping to disk and slows things down by magnitudes. The
above solution is quite satisfactory, but only as long as I'm working
the same machine and haven't loaded up any extra drivers and things
to take free RAM to below 25meg.
My question is: How do I find out, just before allocating the array,
exactly how much free RAM is available ? If I could know this, I
could always make sure that no swapping do disk occurs and at the
same time ensure full usage of RAM.
I have tried looking through the mem.h and dos.h headers and all the
doumentation, but I seem to be unable to find out how to do this.
Any ideas ?
Thanks in advance,
Pete.
*********************************************************************
Peter John Golda * "The eyes are the windows of
Radar Research Group * the soul" - Some Greek Dude
Dept. of Electronic Engineering *
Univ. of Cape Town - South Africa * "My least hated favourite fish
* is sole - sole has no eyes"
e-mail pgolda AT eleceng DOT uct DOT ac DOT za * - Roger Waters
or pgolda AT comgate DOT ee DOT uct DOT ac DOT za *
* Can you see what I'm saying ?
*********************************************************************
- Raw text -