Oleg <lego12...@yandex.ru> wrote: |On Fri, Nov 07, 2014 at 08:19:05AM +0000, Charles Forsyth wrote: |> On 6 November 2014 21:05, Oleg <lego12...@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