Sheerpower Logo C.3  Discovering Overuse of Memory
When developing very large applications, with many programming languages it can be difficult to isolate memory overuse. Sheerpower provides tools to make this isolation easy using the option memlimit NN feature, where NN is the limit in megabytes. Once that limit is reached, Sheerpower will generate an exception and also output a memlimit text file.
option memlimit 200 counter = 300_000_000 a$ = repeat$('x', counter)

MEMLIMIT Output File
The memlimit file is named XXX_memlimit.txt, where XXX is the name of the program. The text file contains the names of all variables and their content, the names of all tables and files, and the names and sizes of the active Sheerpower memory pools. Many of the pools are pre-allocated or over-allocated in order to speed-up processing.
--- Dump of memory pools --- ars MB: 2 code MB: 1 expressions MB: 145 data MB: 2 textfile MB: 17 strings MB: 3830 --- End of memory pools ---
Also, at the top of the file is the source line of the code that was executing on or directly after the memory limit was exceeded.
... details: MEMLIMIT of 4000 MB exceeded when assigning into BIG->DATA$ at MAIN.10
Hide Description

    

       


      

Enter or modify the code below, and then click on RUN

Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use.
Wide screen