6 ms·
dmr wrote the V7 malloc and calloc (which calls malloc) [0,1]. Mike Lesk used calloc in lex ;-) [2] [0] https://github.com/dspinellis/unix-history-repo/blob/Re
by saretired 10y ago
dmr wrote the V7 malloc and calloc (which calls malloc) [0,1]. Mike Lesk used calloc in lex ;-) [2]
[0] https://github.com/dspinellis/unix-history-repo/blob/Research-V7/usr/src/libc/gen/malloc.c https://github.com/dspinellis/unix-history-repo/blob/Researc...
[1] https://github.com/dspinellis/unix-history-repo/blob/Research-V7/usr/src/libc/gen/calloc.c https://github.com/dspinellis/unix-history-repo/blob/Researc...
[2] https://github.com/dspinellis/unix-history-repo/blob/Research-V7/usr/src/cmd/lex/lmain.c https://github.com/dspinellis/unix-history-repo/blob/Researc...
- aap_ 10y agoWhy are you so sure it was written by dmr? The coding style looks like ken's to me: a) no space after if/while/for/etc b) use of "botch". Yes, calloc is used in lex, but that is not part of v6...at least not the official distribution, I don't know when he started development. But since he also uses fopen and friends why shouldn't he be using malloc as well? changing 'calloc(n, m)' to 'malloc(n*m)' doesn't sound like such a huge change.