X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.13.202.195 with SMTP id m186mr11678169ywd.55.1443299866179; Sat, 26 Sep 2015 13:37:46 -0700 (PDT) X-Received: by 10.182.72.200 with SMTP id f8mr53603obv.23.1443299866101; Sat, 26 Sep 2015 13:37:46 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Sat, 26 Sep 2015 13:37:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.192.116.162; posting-account=OsAajgoAAADdKJnkJkmhzqP0jo6I_P_0 NNTP-Posting-Host: 109.192.116.162 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: dlclose not removing dependency dxes From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" Injection-Date: Sat, 26 Sep 2015 20:37:46 +0000 Content-Type: text/plain; charset=ISO-8859-1 Bytes: 2259 Lines: 21 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Friday, September 25, 2015 at 7:21:47 PM UTC+2, Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com] wrote: > On 9/25/15, Ozkan Sezer wrote: > > AFAICS, dlclose()ing of a dxe doesn't remove its dependency dxes along > > with it, which will result in unnecessarily occupied memory which may > > prove fatal upon multiple dlopen()/dlclose() of a dxe with deps. This > > needs addressing. > > > > My last argument was inaccurate and misleading. Here's better: > > One has a.dxe and b.dxe; a.dxe depends on b.dxe. Do dlopen a.dxe > and b.dxe is opened implicitly. Do dlcose a.dxe, and b.dxe stays > open still occupying its memory. The memory occupied by the unused > b.dxe might be needed by the app but will be unavailable to it. > Further dlopen calls for a.dxe will increment the refcount for b.dxe > which never gets decremented. Can you provide a minimal sample code to demonstrate the issue? Regards, Juan M. Guerrero