Path: chuka.playstation.co.uk!news From: gil@snsys.com (Gil Jaysmith) Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: Memory allocation probs... Date: Mon, 27 Oct 1997 16:59:26 GMT Organization: SN Systems Lines: 28 Message-ID: <3454c596.21265918@news.playstation.co.uk> References: <34551BB5.58BA@dial.pipex.com> Reply-To: gil@snsys.com NNTP-Posting-Host: gil.snsys.com X-Newsreader: Forte Free Agent 1.11/32.235 Chris Chadwick wrote: >Hi and, er... HELP! Wotcher Chris... you again eh? >Does anyone know if there's a problem with the GNU library memory >allocation functions, specifically calloc()? All seems to work >fine for normal situations, but if I call calloc() - as shown >below - with numSprites set at a ludicrous value of say, 20000, >the 'after...' message never gets displayed. This leads me to >believe that, in this situation, calloc() never returns (not >even with a NULL pointer) and the whole system hangs :( "Well then don't call it with a ludicrous value of say 20000. I don't know." OK, Tony Hancock returns you to your scheduled response: If calloc has a significant crisis and fails with a bus error or something, this would explain a hang like this. Does the Yaroze provide the ability to install an exception handler? I'd expect it wouldn't, but it's worth a shot. If this is the one declared in malloc.h, incidentally, then this isn't the GNU calloc, but the Sony library implementation. (No way would this explain its poor fault tolerance ;=) - Gil