For Programmers: Free Programming Magazines  


Home > Archive > Prolog > August 2007 > memory management in swi prolog









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author memory management in swi prolog
Michael Felderer

2007-08-23, 4:19 am

I test the performance of queries on UML models and compare it to a Java
implementation.
Therefore I iteratively execute the same queries on growing models
(10,100,1000,... classes) which are imported in XML format. Doing so for
different queries the sgml_parser aborts at different model sizes for
different queries when executing sgml:free_sgml_parser.
Therefore I have a question concerning that: is there a command to
explicitly emtpy all stacks (and other memories ?) before I start
parsing my XML file or some other possibility to clear up memory because
it seems that for different queries the stack is filled differently and
not emptied before parsing the next model.

thanks in advance,
Michael Felderer
Jan Wielemaker

2007-08-23, 10:10 pm

On 2007-08-23, Michael Felderer <michael.felderer@uibk.ac.at> wrote:
> I test the performance of queries on UML models and compare it to a Java
> implementation.
> Therefore I iteratively execute the same queries on growing models
> (10,100,1000,... classes) which are imported in XML format. Doing so for
> different queries the sgml_parser aborts at different model sizes for
> different queries when executing sgml:free_sgml_parser.


If it aborts in free_sgml_parser there is something wrong. Probably it
traps the debugger and free_sgml_parser is the first thing it executes.

> Therefore I have a question concerning that: is there a command to
> explicitly emtpy all stacks (and other memories ?) before I start
> parsing my XML file or some other possibility to clear up memory because
> it seems that for different queries the stack is filled differently and
> not emptied before parsing the next model.


The simplest way is to run the tests using a failure driven loop. I
suspect there may be an issue that GC is not activated while parsing
an XML document. I'll put that on the TODO list, but using a failure
driven loop your experiment should be fine.

Cheers --- Jan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com