Hi everyone,
I'd like to know how does the shell allocate the environment variable. I'm
quite sure it allocates memory dynamically, but if such is the case, I'd
like to know how exactly does it do it. Does it use malloc, or some other
internal allocator?
The reason for my question is that I read in the man page of malloc that
"Recent versions of Linux libc (later than 5.4.23) and GNU libc (2.x)
include a malloc implementation which is tun-able via environment
variables." If that is the case, isn't there some kind of a loop? I mean, it
seems that malloc cannot exist without environment variables, and
environment variables cannot exist without malloc. How is this actually
solved?
Thanks,
Carlos B.