From: salomon AT uni-wuppertal DOT de (Winfried Salomon) Newsgroups: comp.os.msdos.djgpp Subject: Re: malloc() and CWSDPMI 4.0 Date: Wed, 28 Jul 1999 23:18:39 GMT Organization: University of Wuppertal Lines: 21 Message-ID: <379f8cd4.28683251@news.uni-wuppertal.de> References: <378bbab9 DOT 22414525 AT news DOT uni-wuppertal DOT de> <378CB591 DOT 82CC6753 AT americasm01 DOT nt DOT com> <378e1f70 DOT 6963482 AT news DOT uni-wuppertal DOT de> <378E3E83 DOT 144617B0 AT americasm01 DOT nt DOT com> <3790dc42 DOT 950074 AT news DOT uni-wuppertal DOT de> <37936E8A DOT DEDBAD52 AT americasm01 DOT nt DOT com> NNTP-Posting-Host: uni-at-home42.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 Hello Rolf, > > OK, I'm not sure if I understand what you are saying, but I'm guessing you >meant that you can only allocate 64 Megs and any attempt to get higher fails. >If that is the problem, then I have an idea. If you use sbrk() to allocate >memory, you can get it 1 byte at a time, without worrying about malloc headers >or rounding up to a power of 2 stuff (I don't know if that is still a problem in >the current version). Either way, you can store the value of "sbrk(0)" into a >"char*", then continuously call "sbrk(1)" until it returns an error value. When >it returns an error, that means that your original "char*" now points to all >available ram. yes, with sbrk() it it better, because I resumed that free() would work with malloc(), but it doesn't. But with sbrk() I can only access 64 MB too under DOS, under DOS-Box in Win98 in comparison all of the 96 MB, but I don't know if it is virtual memory. What make I wrong? Greetings, Winfried