Newsgroups: comp.lang.prolog
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!rodan.acs.syr.edu!dinapoli
From: dinapoli@rodan.acs.syr.edu (Ron DiNapoli)
Subject: Re: Environments
Message-ID: <1991Mar28.150941.4103@rodan.acs.syr.edu>
Organization: Syracuse University, Syracuse, NY
References: <1991Mar28.113930.1@csc.anu.edu.au>
Date: Thu, 28 Mar 91 15:09:41 GMT

In article <1991Mar28.113930.1@csc.anu.edu.au> ada612@csc.anu.edu.au writes:
>In article <5044@goanna.cs.rmit.oz.au>,
>ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>
>++As it happens, the system I was using was Turbo Prolog 2.something
>++There was one phase of the program which needed a lot of space in
>++area A, but very little in area B.  A later phase needed a lot of
>++space in area B, but very little in area A.  It turned out to be
>++impossible to find a single static allocation which was adequate
>++for both phases.  So I just couldn't run my program.  Why?  Because
>++of an entirely ARTIFICIAL restriction.  There was more than enough
>++space on the machine to do the job.  (In fact ALS Prolog just flew
>++through it.)  But because Turbo's implementors had seen fit to
>++unload part of *their* job onto the paying customer, the system was
>++not usable.
>
>What kind of black magic is ALS Prolog employing here?  The impression
>I get from the Jan 91 issue of AI Expert is that Arity, PDC (formerly
>Turbo), Quintus, & ALS Prologs for MS-DOS all suffer from annoying
>restrictions on memory, and that Turbo (now PDC) is for the most part less
>limited than the others in this respect.  Everybody seems to have to make
>nasty compromises to shoehorn Prolog into MSDOS, and I wonder if Richard's
>program wasn't merely one where ALS's deal with the devil just happened
>to work out while PDC's didn't.
>

ALS Prolog Professional for MS-DOS machines employs a virtual code space
feature which, in theory, allows for an unlimited amount of code to be
compiled.  Due to other restrictions in the system this usually means that,
in practice, you will run into other limitations of the system before you
will run out of code space.  It is possible to run out of code space if the
procedures in physical memory are positioned in such a way that fragments the
physical memory holding them.  If this occurs it is possible that there will
not be a free block of memory large enough to hold a procedure which needs 
to be loaded.

In ALS Prolog for 386 machines (w/ DOS extenders) the Prolog system takes 
advantage of the virtual memory facilities provided by the OS.  The user may,
with command line switches, set the size of the heap and stack.  The code
space is allocated the remainder of memory (virtual) available to the
Prolog application.


Ron DiNapoli
ALS, Inc.






