7 ms·
Zonk. This is a very astute observation. Its awesome behavior, but its good by accident and luck. Therefore... Programming languages should directly suppo
by rhelz 2y ago
Zonk. This is a very astute observation. Its awesome behavior, but its good by accident and luck. Therefore...
Programming languages should directly support a data structure which is guaranteed to have this behavior. Not just that it allocates a new array which is 4k bigger and the copies it over. But one which grows by having the OS map another 4k block to have the addresses past the old end of the array.