From: nikki AT gameboutique DOT co (nikki) Newsgroups: comp.os.msdos.djgpp Subject: Re: failed malloc/callocs :( Date: 5 May 1997 13:02:07 GMT Organization: GameBoutique Ltd. Lines: 23 Message-ID: <5kklof$gg8@bore.pipex.net> References: <5ki242$qe8 AT bore DOT pipex DOT net> <336CF825 DOT 5F47 AT cs DOT com> NNTP-Posting-Host: www.gameboutique.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > But for the task you are attempting, you shouldn't need to use such a > clumsy workaround. malloc() and calloc() both return NULL pointers if > they fail to allocate the desired amount of memory. A simple test will > suffice: true, but it gives no clue as to why it failed. surely when you have 120 meg of virtual memory it's no big deal to ask for 9meg of that? and even on a 16meg machine there should be that amount of real memory. is it perhaps better to ask for it in smaller chunks rather than as one contiguous block? i just fail to understand why it could fail when it had so much available to it. regards, nik -- Graham Tootell | i am nik. nik i am. nikki @gameboutique.com | i do not like mass mail or spam. Dear Mr. Spambot. The following commercial spammers are very interested in your product. please don't hesitate to mail them lots of spam asap. tlehman AT nemesis DOT azlink DOT com tlehman AT mail DOT azlink DOT com