My script does the following
- Reads a huge text file and creates a hash from it. (About 24 million simple pairs of key values. It takes about 5 minutes and consumes 92% of the computerโs memory 4 GB).
- Starts a simulation using information from a hash. (takes about 30 minutes)
- Prints the results at the end of the simulation (to file and standard output)
He then waits 10 + minutes after the last press statement and release. Waiting at the end does not happen every time. During the wait top command, the same 92% memory usage is displayed, but without using a processor. Why does this happen sometimes after its completion? If I hit Ctrl C , it will exit immediately without any changes in the results (s). How do I debug this or expected behavior since the hash is huge?
EDIT
Is it possible to recover memory on the fly by removing unnecessary key-value pairs from the hash?
linux perl swap operating-system hash
Jean
source share