delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/15/22:50:45

From: salomon AT uni-wuppertal DOT de (Winfried Salomon)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: malloc() and CWSDPMI 4.0
Date: Thu, 15 Jul 1999 18:20:39 GMT
Organization: University of Wuppertal
Lines: 44
Message-ID: <378e1f70.6963482@news.uni-wuppertal.de>
References: <378bbab9 DOT 22414525 AT news DOT uni-wuppertal DOT de> <378CB591 DOT 82CC6753 AT americasm01 DOT nt DOT com>
NNTP-Posting-Host: isdn17.dialin.uni-wuppertal.de
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 14 Jul 1999 12:06:42 -0400, "Campbell, Rolf [SKY:1U32:EXCH]"
<cp1v45 AT americasm01 DOT nt DOT com> wrote:

Hello Rolf,

>
>Well, first of all, DJGPP doesn't use XMS memory.  It runs in 32-bit
>protected mode, which means it just uses memory.  (AFAIK XMS has no meani=
>ng
>in 32-bit mode).  This also means that you don't need an XMS manager.
>Also, CWSDPMI uses virtual memory which allows it to simulate extra memor=
>y
>using your hard-disk.

I donīt need especially XMS-Ram, but only 32 Bit linear addressable
Ram, but virtual memory must be switched off.

>
>#include <dpmi.h>
>int __dpmi_get_memory_information(__dpmi_memory_info *_buffer);
>

Now I have a typical C beginners question :-(, if I use this, the
compiler makes an error message '__dpmi_memory_info' undeclared (first
use in this function). I donīt understand this, because the structure
is declared in <dpmi.h>.

>    You can use this function to find the largest allocatable block of
>memory.  But this will not include memory that has already been allocated=
>
>and free'd by your program.  BTW, why do you need to know how much is
>available?  Most programs need a certain, fixed amount.
>

This seems to be an disadvantage, but I only need to allocate the
block at the beginning and i don't free it, so it should work. The
program shall test the Ram, because I have problems with SIMMs. Years
ago I have written such a program in Fortran77, it *must* work in C! I
want to write test patterns in this block and think about an array to
fill and verify it. The address of the memory cell should be offset +
index.

Greetings, Winfried

- Raw text -


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