From owner-freebsd-current@FreeBSD.ORG Thu Mar 6 10:06:22 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBBEA1065670; Thu, 6 Mar 2008 10:06:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au [211.29.132.195]) by mx1.freebsd.org (Postfix) with ESMTP id 798ED8FC16; Thu, 6 Mar 2008 10:06:22 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m26A6J3t010680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Mar 2008 21:06:20 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m26A6JAE069383; Thu, 6 Mar 2008 21:06:19 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m26A6Jbk069382; Thu, 6 Mar 2008 21:06:19 +1100 (EST) (envelope-from peter) Date: Thu, 6 Mar 2008 21:06:19 +1100 From: Peter Jeremy To: Kostik Belousov Message-ID: <20080306100619.GT68971@server.vk2pj.dyndns.org> References: <20080228231522.F57564@delplex.bde.org> <20080229141527.N59899@delplex.bde.org> <18375.43955.908262.696223@hergotha.csail.mit.edu> <47C8D0AB.20506@freebsd.org> <20080302062610.V66431@delplex.bde.org> <47CA2192.8020802@FreeBSD.org> <20080303065527.K69705@delplex.bde.org> <47CF4500.2050509@freebsd.org> <20080306094810.GM57756@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bgLLobvf7eP6VP5c" Content-Disposition: inline In-Reply-To: <20080306094810.GM57756@deviant.kiev.zoral.com.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Tim Kientzle , current@freebsd.org Subject: Re: Breaking the crt1.o -> atexit() -> malloc() dependency X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 10:06:23 -0000 --bgLLobvf7eP6VP5c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 06, 2008 at 11:48:10AM +0200, Kostik Belousov wrote: >On Wed, Mar 05, 2008 at 05:12:32PM -0800, Tim Kientzle wrote: >> Here's a design that I think addresses all of the >> issues people raised, including the POSIX requirement >> that atexit() always be able to support 32 registrations. >> It does it without using sbrk() or mmap(), either. Looks good to me. >I mostly agree with proposal, but there is also __cxa_atexit(). This is a special variant of atexit() and (as far as I can see) can be treated in much the same way - allocate struct atexit_fn and call atexit_register(). >And, besides the issue of the size of the static linked executables, >there is more exposed problem of atexit() memory leaks. See >http://lists.freebsd.org/pipermail/freebsd-stable/2008-February/040644.html I believe that Tim's approach of maintaining a free list and checking it on each atexit() call would handle this since the dlopen() will implicitly invoke atexit() or equivalent. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --bgLLobvf7eP6VP5c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHz8Ib/opHv/APuIcRAlQ8AKCdigiDW6jEnrKZWTfzqccaW1FCnwCgsK1m ahRuqoo0W6IPz4f/F2o9eSg= =oJb0 -----END PGP SIGNATURE----- --bgLLobvf7eP6VP5c--