3 ms·
C doesn't really have malloc or free: those are part of the standard library. You can happily code in C without malloc/free, or you can add a library that provi
by saurik 13y ago
C doesn't really have malloc or free: those are part of the standard library. You can happily code in C without malloc/free, or you can add a library that provides a garbage collected malloc. What C's type system is providing really is bare metal (although as you say, to the abstraction provided by the machine, not to physical reality) to a much more fundamental extent than even a heap allocator, and certainly claiming you could just swap in garbage collection and then have a string type is totally missing the point.