Date: Thu, 14 Jan 1999 09:47:51 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Harold Roman cc: djgpp AT delorie DOT com Subject: Re: UNchain_protected_mode_interrupt_vector? In-Reply-To: <369D0811.C135ED20@giganet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Wed, 13 Jan 1999, Harold Roman wrote: > I believe that the "chain" > call creates a wrapper for the new interrupt handler. And, I > believe that this wrapper is not free'd when the "set" call > is used to unhook the interrpt handler. The wrapper is allocated by a call to _go32_dpmi_allocate_iret_wrapper, not by the function that chains. If you don't need the wrapper anymore, you should deallocate it by calling _go32_dpmi_free_iret_wrapper. > I believe this is > causing a memory leak that eventually kills my app. I find this hard to believe. Memory allocated for the wrapper is less than 100 bytes, plus a 32KB stack that is only allocated once (i.e. it is shared by all interrupt handlers). So, unless you allocate thousands of wrappers, I don't see how this can kill your application.