That's not the point. It's perfectly safe and there's nothing else in C.
The point is you don't have to call this function for every single word. It takes time and pointer increment doesn't
Ooo... spooooky pointers... ancient prophecies speak of the Earth splitting in half and swallowing everyone who's ever thought about allocating memory.
Arnavion|3 years ago
Neither simple.c nor optimized.c call malloc "for every word". They only call malloc when inserting a previously-unseen word into the counting map.
Areading314|3 years ago
yb303|3 years ago
centilliard|3 years ago