Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!aunro!lll-winken!uunet!mcsun!ukc!acorn!spayne From: spayne@acorn.co.uk (Stuart Payne) Newsgroups: comp.sys.acorn Subject: Re: sprites in the desktop and OS_CallBack Message-ID: <7443@acorn.co.uk> Date: 6 Jun 91 11:35:26 GMT References: Sender: spayne@acorn.co.uk Distribution: comp Organization: Acorn Computers Ltd, Cambridge, England Lines: 40 In article gilbertd@p4.cs.man.ac.uk (Dave Gilbert) writes: > >Hi all, >I'm posting this message on behalf of the person named below - reply >to him and not me, or post a reply to the group. > [stuff about sprites deleted] > >The other problem I am having at the moment is with OS_CallBack, it >seems to eat away at my system stack. If I am not running it from >desktop then I get an error, if in desktop the system stack bar >just grows and grows !!! Any ideas ??? > >Reuben Wells. The following is taken from the ReadMe file on the RISC OS Extras Disc, which is available from most Acorn Dealers, SID, and many PD libraries. The disc includes the module IRQUtils which amongst other things does this.... >From version 0.09, IRQUtils also fixes a bug in the SWI OS_AddCallBack mechanism. The bug normally only causes problems for programs which make regular requests for callbacks (eg on a ticker event). It results in the system heap filling up with blocks which have not been freed, and eventually the call to request a callback will return with 'System heap full'. The bug also means there is a small risk of the whole machine crashing, if a request for callback occurs before an earlier request has been granted, and the second requester (which will be 'called' first) issues a SWI which claims a block from the system heap. Programmers who wish to use SWI OS_AddCallBack should therefore RMEnsure the IRQUtils module, and should also 'build' it into application directories if appropriate. The same comments above apply about loading on versions other than RISC OS 2.00. -Stuart