Memory Management with Storage Pools - Update

Memory management can cause real headache due to memory leakage over
time. That is, memory allocation not properly deallocated after
calls. When the memory runs out, the result could be catastrophic for
some applications. In fact, how many times in a week does Windows
95/98/NT have to be rebooted due to memory leakage. This problem will
be a thing of the past because of the powerful Ada 95 feature of,
storage pools. With storage pools heap memory is not longer needed. A
fixed amount of elements can be specified either in the code or read
in from a configuration file during elaboration. Therefore, this
number can be adjusted according to the needs of the application. From
that point on no additional memory is ever needed as long as the
program is running. Thus, memory leakage never occurs as a
result. Even if the program does have memory leakage, storage pools
will print out how many elements were leaked at the end of the
program. With this memory leakage detection capability, the programmer
can tell if his program needs to be fixed or not. As long as the
storage pools are not exhausted, the storage pools resources will be
claimed and returned to the operation system once the program is no
longer running. Once again, the operating system does not need to be
reboot. Of course, it is desired to fix the program if it contains
memory leaks. Finally, if the program works perfectly, storage pools
also say so at the end of the program.  Enjoy.

Download Here

Contributed by: Anh Vo
Contributed on: March 15, 2000
License: Public Domain