Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!munnari.oz.au!manuel!durras!andaling From: andaling@durras.anu.edu.au ("A.Andrews") Newsgroups: comp.lang.prolog Subject: re: environments Keywords: MSDOS, memory allocation Message-ID: Date: 29 Mar 91 01:46:16 GMT Sender: news@newshost.anu.edu.au Distribution: comp Organization: Computer Services Centre, Australian National University Lines: 30 Responding to some messages about memory allocation in LSA prolog that our news system seems to have lost ... I still find no evidence that PDC prolog is particularly primitive or lazy in its memory allocation. In it you specify the size of the stack and the trail, each with a 64K max, and the remaining areas (global stack & heap, for structures that are to be reclaimed on backtracking & those that aren't, respectively) jointly occupy the remaining available memory (which you can restrict if you want to), growing toward each other (the heap is subject to fragmentation, and doesn't automatically compress itself, but you can compact it manually if you want to, though this is harder than I think it ought to be -- this I guess is somewhat culpable). The 64K limits sound depressingly familiar, but I haven't found them particularly irksome, presumably because structures are stored on the global stack, which does not have a 64K limit (what happens with structures in other kings of PC Prolog? - my impression of 86 vintage Arity is that a single 64K stack performed the functions of both PDC's local and global stacks, but this might well be a misinterpretation). All the MSDOS Prolog systems seem to be blemished with 64K limitations, and even though everyone whinges about them as being utterly stupid, they seem to be something that MSDOS forces on you if you want tolerable execution speed. And PDC has nothing like the 40K `clause space' limitation of ALS Prolog, whatever that amounts to (but it sounds pretty ominous to me -- perhaps part of the price you by for on-the-fly compilation of conditional clauses?). Avery Andrews (ada612@csc.anu.edu.oz)