I enjoyed this post on allocation archeology in Unix source code:
https://napcakes.nekoweb.org/posts/malloc/
- m in malloc used to mean something!
- sized deallocs, arenas
- =+ was a thing before 1976??
- galloc??
I enjoyed this post on allocation archeology in Unix source code:
https://napcakes.nekoweb.org/posts/malloc/
- m in malloc used to mean something!
- sized deallocs, arenas
- =+ was a thing before 1976??
- galloc??
@zeux I also recommend reading through the source code at https://www.nokia.com/bell-labs/about/dennis-m-ritchie/primevalC.html some time.
@zeux =op was the original op=, yeah, inherited from B
I know this from the LCC book which somewhat enigmatically alludes to it in an exercise asking how +=, -= etc. work since there don't seem to be token codes for them in the lexer :)
@zeux this one implements modern C +=, -= etc.
I think dmr's C history comments on how =+ etc. were added to the B compiler because it was "a very small change in the parser" and the LCC version basically tells you how:
with the old C grammar (=+ etc.) you just check the lookahead token in the assignment operator and then do the equivalent of the `incr` thing LCC does to build the expression tree node