bsa@kf8nh.wariat.org
Date: 02/28/93


From: bsa@kf8nh.wariat.org
Subject: Re: Thought: compressed libc ?
Date: Sun, 28 Feb 1993 18:12:45 GMT

In article <1993Feb26.172131.28714@sol.UVic.CA> pmacdona@sanjuan (Peter MacDonald) writes:
>In article <1993Feb26.093317.3648@klaava.Helsinki.FI> torvalds@klaava.Helsinki.FI (Linus Torvalds) writes:
>>In article <1mj6ejINNlhg@life.ai.mit.edu> mycroft@hal.gnu.ai.mit.edu (Charles Hannum) writes:
>>>In article <1993Feb25.155944.25246@sol.UVic.CA> pmacdona@sanjuan (Peter
>>>MacDonald) writes:
>>>> What I have long wondered is, could the same type of thing be done in
>>>> the kernel? ie, a special null page could be maintained (virtually?)
>>>> and the calloc function could have a system call to let the kernel
>>>> manage allocation etc.
>>>
>>>Many Unices already do this.
>>
>>And linux already does (and has done since day 1). Feel free to
>>malloc() 200MB on a 4MB machine - it's only when you start to actually
>
>I can see that I was not clear. Note that I said "calloc" not malloc.

I think the current wisdom wrt. calloc() is: don't use it. It's a source of
potential bugs, because a page filled with zero bytes may not actually be an
appropriate zero for the data type to be stored there.

(Last time this came up --- comp.unix.wizards, I think --- there was a massive
flamewar about it. Prior notice: responses of that type will be junked
unread.)

++Brandon