delorie.com/archives/browse.cgi | search |
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:2281 |
Path: | news-dnh.mv.net!mv!news.sprintlink.net!in2.uu.net!noc.near.net!das-news2.harvard.edu!oitnews.harvard.edu!newsfeed.rice.edu!rice!news!sandmann |
From: | Charles Sandmann <sandmann AT clio DOT rice DOT edu> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Some "stupid" questions from a new user |
Date: | Fri, 29 Sep 1995 08:15:33 CDT |
Organization: | Rice University, Houston, Texas |
Lines: | 9 |
References: | <DFMsty DOT Mtw AT jade DOT mv DOT net> <44g2h2$lft AT ixnews6 DOT ix DOT netcom DOT com> |
Reply-To: | sandmann AT clio DOT rice DOT edu |
Nntp-Posting-Host: | clio.rice.edu |
To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
Dj-Gateway: | from newsgroup comp.os.msdos.djgpp |
> BTW, I use malloc(HUGE) instead of "int intarray[arraysize]". On huge programs, this is probably a mistake with the default djgpp malloc since it rounds up all requests to the nearest power of 2 before allocating a bucket of memory. So, malloc(8Mb+1) will actually require 16Mb of memory. In V1 under DPMI the memory gets zeroed, faulting it all in, which causes terrible performance. In V2 we no longer zero sbrk()ed memory by default. The easy way around this is to call sbrk() directly for large requests which you don't plan to free() during program execution.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |