cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/14/02:49:14

Date: Thu, 14 Jan 1999 09:47:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Harold Roman <harold AT giganet DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: UNchain_protected_mode_interrupt_vector?
In-Reply-To: <369D0811.C135ED20@giganet.com>
Message-ID: <Pine.SUN.3.91.990114094722.29871E-100000@is>
MIME-Version: 1.0
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019