[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 64 MB memory Limit? and question

From: Elmar Haneke
Subject: Re: 64 MB memory Limit? and question
Date: Thu, 07 Mar 2002 14:04:57 +0000
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.8) Gecko/20020204

Erick Alphonse wrote:

But Daniel said he was working on a new memory management framework,
with garbage collection. Maybe that will lift the current restriction?

The garbare collection can reduce the need for huge stacks significantly since wasted space is recycled. On Systems with GC (e.g. if I run my program in SWI-Prolog) the same code does usually require much less space.

By the way an auto-expandable stack would be very nice [;)] . Is it so

The Stacks are allocated as contingous memory blocks. If this is kept valid reallocating stacks might result in an great memory fragmentation: To enlagge an 30M stack to 40M you have to alloc additional 40M if the memory next to the the 30M segment is not available.

Dynamic stack growing done by many OS is not faced with this problem: In the linear 4G addressspace they are growing the stack downwards and the heap upwards. Until Stack and heap will meet there is always free adresspace to alloc additional space for stack.

To transform this mechanism to the different prolog memory areas you will have to use OS-specific tricks or it is impossible at all.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]