From: DavMac AT iname DOT com (Davin McCall) Newsgroups: comp.os.msdos.djgpp Subject: Re: DPMI memory allocation Date: Fri, 05 Nov 1999 04:33:07 GMT Organization: Monash Uni Lines: 48 Distribution: world Message-ID: <38225c5c.13683318@newsserver.cc.monash.edu.au> References: <3821E566 DOT 15FB AT radar DOT mcgill DOT ca> NNTP-Posting-Host: damcc5.halls.monash.edu.au X-Trace: towncrier.cc.monash.edu.au 941776393 3420 130.194.198.138 (5 Nov 1999 04:33:13 GMT) X-Complaints-To: abuse AT monash DOT edu DOT au NNTP-Posting-Date: 5 Nov 1999 04:33:13 GMT X-Newsreader: Forte Free Agent 1.1/32.230 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com [posted and emailed] Re: your post below. Sounds like a classical case where interrupt handlers are not being locked (and can therefore be swapped to disk). This causes problems when the interrupt occurs when DOS is busy, as to swap in the interrupt handler code, a DOS call must be made (and DOS is not generally re-entrant). Another thing to watch: Are you trying to perform a disk/file operation from within an interrupt handler? This is another thing which should generally be avoided, as DOS may be "busy" when the interrupt occured. Davin. On Thu, 04 Nov 1999 19:57:46 GMT, Frederic Cazenave wrote: >Hi, > >I have written an application which allocates all >the free pages of my memory to make a very large >ring buffer. This buffer is filled when I receive >an interrupt from an acquisition board. The main >program reads the buffer and displays the data on >the screen using allegro lib. Everything works >fine until I ask to save data. Then I open a file >in binary, and each time a "Save_Buffer" is near >to be full I write it on the file. This write >operation crashes my machine most of the time. >If it works one time, I can ask to repeat the >operation without problem. >The system works if instead of allocating all the >free pages of the system I only allocate 50 kb. >Even if I try with half of the free pages the system >crashes. > >What's wrong ????? > >Thanks in advance >Could you send me your answer by email too. __________________________________________________________ *** davmac - sharkin'!! davmac AT iname DOT com *** my programming page: http://yoyo.cc.monash.edu.au/~davmac/