Date: Thu, 6 Mar 2008 21:06:19 +1100 From: Peter Jeremy <peterjeremy@optushome.com.au> To: Kostik Belousov <kostikbel@gmail.com> Cc: Tim Kientzle <kientzle@freebsd.org>, current@freebsd.org Subject: Re: Breaking the crt1.o -> atexit() -> malloc() dependency Message-ID: <20080306100619.GT68971@server.vk2pj.dyndns.org> In-Reply-To: <20080306094810.GM57756@deviant.kiev.zoral.com.ua> References: <20080228231522.F57564@delplex.bde.org> <alpine.BSF.1.00.0802281109320.27124@thor.farley.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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080306100619.GT68971>