This question arose from something on the isabelle-dev list but I think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting threads" message if it really cannot allocate the required memory after a full GC. This is actually rather unlikely for small cells. Instead as the amount of free space left in the heap gets smaller the GC runs more and more often. The ML code is still making progress but only very slowly. I wonder if there is a case for actually giving up at that point. Is it better to plough on in the hope that the program will complete or is it more helpful to produce a message and allow the user to try with more memory? This situation is most likely to happen if the heap space is restricted either because the address space limit has been reached in 32-bit mode or if the maximum heap has been set too low with --maxheap.
David
Hi,
some Prologs have predicates to inform the user of gc, memory usage and timings at runtime. Embedded in ones code this is also helpful to write more efficient code.
Michael
On Thu, 15 May 2014, David Matthews wrote:
This question arose from something on the isabelle-dev list but I think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting threads" message if it really cannot allocate the required memory after a full GC. This is actually rather unlikely for small cells. Instead as the amount of free space left in the heap gets smaller the GC runs more and more often. The ML code is still making progress but only very slowly. I wonder if there is a case for actually giving up at that point. Is it better to plough on in the hope that the program will complete or is it more helpful to produce a message and allow the user to try with more memory? This situation is most likely to happen if the heap space is restricted either because the address space limit has been reached in 32-bit mode or if the maximum heap has been set too low with --maxheap.
David _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Poly/ML has the Statistics structure that provides this information but it requires the user program to actively poll it.
David
On 15/05/2014 17:17, mmoel wrote:
Hi,
some Prologs have predicates to inform the user of gc, memory usage and timings at runtime. Embedded in ones code this is also helpful to write more efficient code.
Michael
On Thu, 15 May 2014, David Matthews wrote:
This question arose from something on the isabelle-dev list but I think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting threads" message if it really cannot allocate the required memory after a full GC. This is actually rather unlikely for small cells. Instead as the amount of free space left in the heap gets smaller the GC runs more and more often. The ML code is still making progress but only very slowly. I wonder if there is a case for actually giving up at that point. Is it better to plough on in the hope that the program will complete or is it more helpful to produce a message and allow the user to try with more memory? This situation is most likely to happen if the heap space is restricted either because the address space limit has been reached in 32-bit mode or if the maximum heap has been set too low with --maxheap.
David _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
I didn't miss 'Statistics' as yet since I rarely max out the machines. Good to know it's there. I just gave it a try in a program which runs quite some time building some large binary trees. The resulting record leaves nothing to be desired. However, if it's only about whether to continue a process or not while running out of memory the PolyML engine will do better than some home-made exception handling.
Michael
On Sat, 17 May 2014, David Matthews wrote:
Poly/ML has the Statistics structure that provides this information but it requires the user program to actively poll it.
David
On 15/05/2014 17:17, mmoel wrote:
Hi,
some Prologs have predicates to inform the user of gc, memory usage and timings at runtime. Embedded in ones code this is also helpful to write more efficient code.
Michael
On Thu, 15 May 2014, David Matthews wrote:
This question arose from something on the isabelle-dev list but I think it's really of general interest.
Currently Poly/ML only gives the "Run out of store - interrupting threads" message if it really cannot allocate the required memory after a full GC. This is actually rather unlikely for small cells. Instead as the amount of free space left in the heap gets smaller the GC runs more and more often. The ML code is still making progress but only very slowly. I wonder if there is a case for actually giving up at that point. Is it better to plough on in the hope that the program will complete or is it more helpful to produce a message and allow the user to try with more memory? This situation is most likely to happen if the heap space is restricted either because the address space limit has been reached in 32-bit mode or if the maximum heap has been set too low with --maxheap.
David _______________________________________________ polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
polyml mailing list polyml at inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml