Re: Prolog, memory management and memory leaks
- From: Duncan Patton <campbell@xxxxxxxxxx>
- Date: Wed, 30 Jan 2008 21:32:37 GMT
On Tue, 29 Jan 2008 07:46:24 -0600
A.L. <alewando@xxxxxxxxxxxx> wrote:
On Tue, 29 Jan 2008 04:12:54 -0800 (PST), Mats <matsc@xxxxxxx> wrote:
O
In my experience, a more difficult kind of "memory leak" is memory
fragmentation. Many Prolog implementations manage their own memory;
others rely on malloc & free or similar. In both cases, memory can
easily become fragmented when the process has run for a long while,
filling the memory with blocks that are too small to be useful. Some
memory managers (SICStus's for example) coalesce adjacent free blocks
as far as possible, but I'm not aware of any Prolog that move blocks
around and completely defragment memory, which would be extremely
complex, what with all the necessary relocation and everything. The
only safe cure I know of is to restart the process.
--Mats
Agree. I had this problem with this early application, although not
necessary created by Prolog. Prolog was crashing because lack of
memory, despite enough memory was available, but fragmentation was
done by Java. Objects created using JNI are "pinned" - they cannot be
moved by GC and memory gets fragmented. Because of this, Java was
crashing as frequently as Prolog.
Current application doesn't run in continuous mode like the old one -
our ambition is to complete single session without restart. However,
if it is not possible, we will restart server in the middle of the
process.
A.L.
I've found that run to completion/restart is more reliable for most
environments, not just Prolog.
Dhu
.
- Follow-Ups:
- Re: Prolog, memory management and memory leaks
- From: A . L .
- Re: Prolog, memory management and memory leaks
- References:
- Prolog, memory management and memory leaks
- From: A . L .
- Re: Prolog, memory management and memory leaks
- From: bart demoen
- Re: Prolog, memory management and memory leaks
- From: Mats
- Re: Prolog, memory management and memory leaks
- From: A . L .
- Prolog, memory management and memory leaks
- Prev by Date: Re: Prolog, memory management and memory leaks
- Next by Date: Re: Prolog, memory management and memory leaks
- Previous by thread: Re: Prolog, memory management and memory leaks
- Next by thread: Re: Prolog, memory management and memory leaks
- Index(es):
Relevant Pages
|
|