www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/04/04:08:14

Date: Mon, 4 May 1998 11:05:32 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: MalcolmJ7 <malcolmj7 AT aol DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Memory ALLOCATION
In-Reply-To: <1998050319372600.PAA17833@ladder01.news.aol.com>
Message-ID: <Pine.SUN.3.91.980504110227.23995A-100000@is>
MIME-Version: 1.0

On 3 May 1998, MalcolmJ7 wrote:

> I am just begining in DJGPP.  I am used to 640K memory.  If I use the simple
> function Malloc(6000000) will i allocate 6MB of RAM or do i have to do
> something else?

No, calling `malloc' is the only thing you need to do.  If you have any 
problems with that, check out chapter 15 in the DJGPP FAQ list 
(v2/faq210b.zip from the same place you get DJGPP) for some subtleties.

> When i use functions such as biosmemory, or go32_dpmi_get_physical_memory(), it
> returns my total memory not whats left.

That's not true, _go32_dpmi_remaining_physical_memory reports the 
*remaining* memory amount.  (Don't use biosmemory, it only reports 640K.)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019