www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/12/15:43:52

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Growing pains with DJGPP
Date: Sat, 12 Apr 1997 01:36:54 -0700
Organization: Two pounds of chaos and a pinch of salt
Lines: 80
Message-ID: <334F49A6.5D8F@cs.com>
References: <5ingih$3dq$1 AT sparcserver DOT lrz-muenchen DOT de>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp105.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eduard Ralph wrote:
> 
> Hi there,
> 
> I just recently started out with DJGPP because of the out-of date
> technology in the last good DOS-based C compiler BC 3.1

Hello, and welcome to the club!  ;)  I'm replying via both news and
email to be sure you get this message - it's standard practice on the
newsgroup/mailing list.  If you have news access and don't want to get
all those emails, all you need to do is read the newsgroup
comp.os.msdos.djgpp.  The list is mirrored to and from the newsgroup.

> Anyways, after receiveing over 700 mails on my first subscription to
> this list, I decided to forgo reading them all (I understand there are
> over 150 new ones every day?) and just will post a few questions that
> arose during my work with it in the last 4 weeks. If there's a thread
> to that, feel free to point it out to me.

150 new messages?  It's more like 40-50 on an average day.  Of course,
the more users there are, the more messages get posted, so the numbers
have been slowly creeping up.  But 150 is a lot more than I have ever
seen.  ;)

> My first one would be: how is the portability between DJGPP written
> under DOS and Linux?
> Basicly speaking it should be fine, but if anyone has experience with
> it, I would appreciate any comments.

Both Linux gcc and DJGPP gcc are ports of exactly the same compiler. 
The only major differences are than under Linux, hardware interface
stuff like graphics and interrupt handling are a LOT different.  Any
program that conforms to the POSIX specification should be fully
portable.

> Second one: I know DJGPP has access to the full Memory in my system
> (Pmode and that stuff), so we're talking about no more Memory model
> worrys right? If I felt like it I could construct a two dimensional
> array with over 64kb of Space? (e.g. char string[32000][32000]) (old
> BC 3.1 user :-)) I could also just make my heap a few million bytes
> big and use that as buffer? (not the best idea, I know we're talking
> theory here)

DJGPP uses protected mode, which allows you to use hard drive space as
virtual memory to supplement your physical memory.  You have unlimited
(i.e., unsegmented) access to up to 4 GB of memory.  Of course, this is
limited by your available memory and the design of whatever DPMI host
you're using.  For example, Windows 95 provides up to 64 MB of virtual
memory; the free cwsdpmi host that accompanies the DJGPP distribution
allows up to 256 MB of memory:  128 MB physical and 128 MB virtual.

You can allocate nearly any size of structure you want within those
limits.  To find out how much free memory you have, you can use the
'go32-v2' program that accompanies DJGPP.  Just type 'go32-v2' to see a
report of free physical and virtual memory.  In your programs, you can
#include <dpmi.h> and use the _go32_dpmi_remaining_physical_memory() and
_go32_dpmi_remaining_virtual_memory() functions.  You should also be
aware that DJGPP's malloc() rounds memory requests up to the nearest
power of 2, so asking for 17 MB will actually allocate 32.  It's an
optimization for speed as opposed to efficiency; there are several ways
around it.

> Forth: One thing I realized with RHIDE. It tends to let the mouse
> pointer vanisch if you switch to a graphical User Screen and the
> switch back. Is that a known prob or n purpose??

It's a known bug in RHIDE.  Shawn Hargreaves, the author, is currently
working on a solution.

> Thanx for any good replies....

I hope this counts.  ;)

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


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