9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <sdaoden@yandex.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] atexit() & atexitdont()
Date: Fri,  7 Nov 2014 11:57:08 +0100	[thread overview]
Message-ID: <20141107105708.cOSXGRv3%sdaoden@yandex.com> (raw)
In-Reply-To: <20141107094425.GA29497@localhost>

Oleg <lego12239@yandex.ru> wrote:
 |On Fri, Nov 07, 2014 at 08:19:05AM +0000, Charles Forsyth wrote:
 |> On 6 November 2014 21:05, Oleg <lego12239@yandex.ru> wrote:
 |> 
 |>> I looked at atexit() and atexitdont() and i don't understand why these
 |>> functions are implemented with a static array instead of singly linked
 |>> list?

 |> It might have been to avoid malloc in a fairly low-level function (and of
 |> something that will never be freed),
 |
 |If malloc works like in linux (at first invocation allocate more bytes than
 |requested and then each malloc() use this already allocated by kernel area
 |of memory), i think this isn't a big performance impact.

Safety against asynchronous un-/registration can't be it, anyway.

--steffen



  parent reply	other threads:[~2014-11-07 10:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 21:05 Oleg
2014-11-06 21:26 ` erik quanstrom
2014-11-06 21:42   ` Skip Tavakkolian
2014-11-06 21:44     ` Skip Tavakkolian
2014-11-06 22:50       ` lego12239
2014-11-06 22:45   ` Oleg
2014-11-07  7:17   ` k0ga
2014-11-07  8:02     ` Oleg
2014-11-07  8:19 ` Charles Forsyth
2014-11-07  9:44   ` Oleg
2014-11-07 10:22     ` Charles Forsyth
2014-11-07 11:05       ` Oleg
2014-11-07 10:57     ` Steffen Nurpmeso [this message]
2014-11-07 11:49       ` Charles Forsyth
2014-11-07 12:19         ` Oleg
2014-11-07 12:27           ` Charles Forsyth
2014-11-07 19:53             ` erik quanstrom
2014-11-07 20:30               ` Oleg
2014-11-07 19:25         ` Steffen Nurpmeso
2014-11-07 17:45 sl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141107105708.cOSXGRv3%sdaoden@yandex.com \
    --to=sdaoden@yandex.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).