Path: chuka.playstation.co.uk!news From: Chris Chadwick Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: argh Date: Thu, 26 Nov 1998 23:36:18 -0800 Organization: PlayStation Net Yaroze (SCEE) Lines: 27 Message-ID: <365E5672.47F4@dial.pipex.com> References: <73i0rg$9ia6@chuka.playstation.co.uk> <73j1ld$9ia11@chuka.playstation.co.uk> <73jj6i$9ia13@chuka.playstation.co.uk> <365D5685.328E0BF5@scee.sony.co.uk> NNTP-Posting-Host: userp292.uk.uudial.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.02 (Win95; I; 16bit) Ooops, sorry James. I meant to send that message to the news groups but clicked the email button by mistake... -Chris James Russell wrote: > > Nigel Critten wrote: > > > > below is what I'm doing to allocate the memory > > > > u_long *image = (u_long *)malloc ((grabwidth*grabheight/2+5)*4); > > > > this causes a freeze. > > Have you called InitHeap? You must do this before using malloc. > Oh. I've been using malloc/calloc for ages now without calling InitHeap and never had any problems. I remeber I was going to use InitHeap but found the parameters confusing, or something. Besides, I seem to recall reading somewhere that initialization code does a heap initialization, so an explicit InitHeap call isn't strictly necessary. What's the story? Cheers, -Chris