[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 64 MB memory Limit? and question
From: |
Erick Alphonse |
Subject: |
Re: 64 MB memory Limit? and question |
Date: |
Thu, 07 Mar 2002 18:41:38 +0100 |
Elmar Haneke wrote:
>
> 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.
I agree. Unfortunately, the main problem I face with the memory limit is
loading 300M databases.
> By the way an auto-expandable stack would be very nice [;)] . Is it so
> inefficient?
>
> 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.
>
Thank you, Elmar. Do you think that is OS-specific or hardware specific
(MMU)? SWI has an expandable stack and is available on several
plateforms. Do you know about what is used?
Best regards,
Erick.