🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53557

malloc on '386 MSDOS system

#53557
From: GORDON ALLEN R
Date: Mon, 28 Oct 1991 16:20
25 lines
1526 bytes
On version 1.04 of the djgpp port of gcc, I have run a small program which
continually allocates memory with malloc, until it returns a null pointer.
However, it never seems to to this.  For example, malloc (50*1024*1024)
returns a non-null pointer.  What happens in the first situation, is that
DOS returns a segmentation error and bombs the program.  Furthermore,
the 9+ MB of extended memory which was available prior to running the
program is not available after, as determined by a memory checking program.
The memory manager is himem.sys.

Any thoughts/ideas about this?

BTW running the same program with turbo c, yields a maximum available memory
of about 500K (give or take), since it doesn't handle extended memory directly.

Thanks

Allen Gordon



--
Allen Gordon 
University of Colorado, Boulder
gordon@tramp.colorado.edu 
gordon_A@cubldr.colorado.edu
Technical Details
Message-ID: <1991Oct28.162055.27049@colorado.edu>
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!boulder!tramp.Colorado.EDU!gordon

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,712018a4caefcdfd,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-10-28 08:50:15 PST
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!boulder!tramp.Colorado.EDU!gordon
From: gordon@news.colorado.edu (GORDON ALLEN R)
Newsgroups: gnu.gcc.help
Subject: malloc on '386 MSDOS system
Keywords: malloc, msdos, '386
Message-ID: <1991Oct28.162055.27049@colorado.edu>
Date: 28 Oct 91 16:20:55 GMT
Sender: news@colorado.edu (The Daily Planet)
Organization: University of Colorado, Boulder
Lines: 25
Nntp-Posting-Host: tramp.colorado.edu