On Aug 13, 2019, at 3:11 PM, Jose Isaias Cabrera <jic...@outlook.com> wrote: > > Somewhere in my basement exists a book called, "The C Programming Language.”
It’s worth a re-read, even if you no longer use C. You will certainly find insights that affect however you *do* program these days. The last time I dipped into my first-edition copy, I discovered that K&R C didn’t even have malloc()! That was considered outside the language, something to be left to the host OS’s API. Instead, the book has two code examples showing how to implement something malloc-like atop the old Unix brk(2) syscall. There is no malloc() in V6 UNIX’s libc, either. That didn’t appear until V7 UNIX, which was released about a year after the first edition of K&R was published. That code is a lot like the second implementation of alloc() in K&R, within its Appendix A. The earlier implementation of alloc() in the book was trivial: inefficient, but easy to understand. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users