Shared Lib Question (ISC)
Alex Goykhman
goykhman_a at apollo.HP.COM
Fri May 17 06:34:00 AEST 1991
In article <1991May10.192648.3147 at Think.COM> barmar at think.com writes:
>In article <19255 at rpp386.cactus.org> jfh at 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 at 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 at apollo.hp.com
More information about the Comp.unix.internals
mailing list