Date: Thu, 17 Sep 1998 16:48:15 +0300 (IDT) From: Eli Zaretskii To: Rob Kramer cc: djgpp AT delorie DOT com Subject: Re: IRQ callback wrapper? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 17 Sep 1998, Rob Kramer wrote: > I'm using _go32_dpmi_allocate_real_mode_callback_retf() to allocate a > callback wrapper. Can anyone tell me if it is a terrible sin not to free > that wrapper before exiting my program? I think you should free it yourself, since some DPMI servers (notably Windows 9X and NT) don't clean up some resources correctly, and a real-mode callback is a scarce resource: a server is only required to provide 16 callbacks per task. I don't think it should be a problem with CWSDPMI, though. Can't you register a function with `atexit' that frees the callback? > And what about memory that I locked, do I have to unlock it? No. Locking memory just tells the VM machinery to never page it out, but it doesn't prevent that memory from being released just like any other memory. > I'm experiencing weird crashes of things that I run after my program has > finished. Running the same program twice won't always work either. Maybe if you posted the messages printed when they crash, you could get more efficient help?