Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!apollo!goykhman_a From: goykhman_a@apollo.HP.COM (Alex Goykhman) Newsgroups: comp.unix.internals Subject: Re: Shared Lib Question (ISC) Message-ID: <519a55d6.20b6d@apollo.HP.COM> Date: 16 May 91 20:34 GMT Sender: root@apollo.HP.COM Reply-To: goykhman_a@apollo.HP.COM (Alex Goykhman) Lines: 23 In article <1991May10.192648.3147@Think.COM> barmar@think.com writes: >In article <19255@rpp386.cactus.org> jfh@rpp386.cactus.org (John F Haugh II) writes: >> Name a single library function >>which cannot be implemented well without global variables. > >Malloc() needs a global variable that points to the arena.......................... > >Barry Margolin, Thinking Machines Corp. > >barmar@think.com >{uunet,harvard}!think!barmar Malloc() allocates memory from a process' data region. Its internal data structures are only global to a process, but not the kernel and shared libraries. Malloc() is always called in a particular context, and always has to deal with a single set of memory structures. It should not matter whether malloc() is linked to to a particular process statically, or dynamically. Alex Goykhman speaking for myself Chelmsford System Software Lab mit-eddie!apollo!goykhman_a Hewlett-Packard, Company goykhman_a@apollo.hp.com