Mail Archives: djgpp/1994/11/07/18:03:02
Hi,
> Call _go32_dpmi_remaining_physical_memory(). It tells you how much
> physical memory remains unallocated in the system at the time of the
> call. It's in <dpmi.h>
Thanks for the help, but I'm still confused. Sorry to bug you, but
could you please have a look at the following:
Memory configuration as reported by MEM:
655360 bytes total conventional memory
655360 bytes available to MS-DOS
509200 largest executable program size
4587520 bytes total EMS memory
4046848 bytes free EMS memory
15728640 bytes total contiguous extended memory
0 bytes available contiguous extended memory
10317824 bytes available XMS memory
MS-DOS resident in High Memory Area
So, I have 16 meg ram right now, of which 4 meg is going to EMM386
EMS.
Here's the output of my program:
Processing begins...
Available Physical Memory: 4345856
Available Virtual Memory: 117682176
File Length 1048576 bytes.
Available Physical Memory: 4333568
Available Virtual Memory: 117678080
Reading entire input file...
Calculating magnitudes...
Writing to output file...
Number of overflows was 0
Completed...
The first set of "Available..." is after a few lines of code but
BEFORE any memory allocation.
The second set is after allocation of File Length bytes (1048576).
Seems like not much has changed ???
Would you know what's wrong ? I just want to know how much memory is
available to a call to malloc().
Thankyou for your time,
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 -