Article View: gnu.gcc.help
Article #53558Re: malloc on '386 MSDOS system
From: Pete Bergstrom
Date: Mon, 28 Oct 1991 17:53
Date: Mon, 28 Oct 1991 17:53
26 lines
1906 bytes
1906 bytes
Allen Gordon (gordon@news.colorado.edu) writes: >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? Doesn't the DOS extender give you up to 512 MB (256 MB RAM and 256 MB disk) of virtual memory? If so (or in the ballpark for numbers), it sounds like a conflict with the extender and your DOS. As for the missing memory, my understanding of the extended memory capability says that applications must return memory (DOS doesn't handle it) or no one else will get it. I'm afraid I don't have more information on this - I've installed djgpp and run the two sample programs and that's about it. Pete
Technical Details
Message-ID:
<1991Oct28.175353.27604@src.honeywell.com>Path:
arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!wupost!uwm.edu!src.honeywell.com!bergstroReferences:
<1991Oct28.162055.27049@colorado.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,712018a4caefcdfd X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1991-10-28 11:21:21 PST Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!wupost!uwm.edu!src.honeywell.com!bergstro From: bergstro@src.honeywell.com (Pete Bergstrom) Newsgroups: gnu.gcc.help Subject: Re: malloc on '386 MSDOS system Message-ID: <1991Oct28.175353.27604@src.honeywell.com> Date: 28 Oct 91 17:53:53 GMT References: <1991Oct28.162055.27049@colorado.edu> Sender: news@src.honeywell.com (News interface) Organization: Honeywell Systems & Research Center Lines: 26 In-Reply-To: gordon@news.colorado.edu's message of Mon, 28 Oct 1991 16: 20:55 GMT Nntp-Posting-Host: gumby.src.honeywell.com