4 ms·
And even if heap allocated, there might be a static pointer array tracking them. In the DOS days, dynamic memory allocation was to be avoided if possible. Mach
by queuebert 2y ago
And even if heap allocated, there might be a static pointer array tracking them.
In the DOS days, dynamic memory allocation was to be avoided if possible. Machines did not handle running out of memory gracefully. Often we'd unnecessarily fix the size of things to avoid run-time uncertainty.
A scientific Fortran code I once saw allocated all of the memory it would need at the beginning of the code in an array called 'a'. Then from there it would dole out portions to other parts of the program using common blocks.
- pklausler 2y agoI suspect what you’re trying to describe was the use of blank COMMON as a dynamic storage pool. The anonymous COMMON block begins at the address after the last named block.