Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site amiga.amiga.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!amiga!bruceb From: bruceb@amiga.UUCP (Bruce Barrett) Newsgroups: net.micro.amiga Subject: Re: MEMORY MANAGEMENT AND AMIGABASIC Message-ID: <845@amiga.amiga.UUCP> Date: Tue, 11-Mar-86 22:44:08 EST Article-I.D.: amiga.845 Posted: Tue Mar 11 22:44:08 1986 Date-Received: Fri, 14-Mar-86 04:47:39 EST References: <1476@caip.RUTGERS.EDU> Reply-To: bruceb@hunter.UUCP (Bruce Barrett) Organization: Commodore-Amiga Inc., 983 University Ave #D, Los Gatos CA 95030 Lines: 48 In article <1476@caip.RUTGERS.EDU> jwhitman@ALMSA-1.ARPA writes: >From: Jerry Whitman > > [ ...problems w 256k Amiga and AmigaBasic... ] >3. The first problem encountered is with AmigaBASIC (MicroSoft V1.1) and >its memory management. Opening Basic by double clicking it from the Extras >disk yields two messages in the immediate window. 1 - 40xxx bytes storage >available to system, and 2 - 14xxx bytes available to Basic. Using the >clear >command I can re-allocate the 14k between the Basic Data and the Basic Stack. >However I do not find any way to re-allocate more of the 40k to Basic. Am I >missing something fundamental here?? > I looks to me as though AmigaBASIC wants to allocate 2 contigious spaces for its stack and data areas. The CLEAR command seems to 1) Grab the memeory you requested from the system, 2) Copies source code into the new copy, 3) releases the original area. For this reason, if you try to go from a medium size region to a large one you can get an out of memory error even though there "should be" enough memory in the system. To "maximize" available memory: 1) disconnect 2nd frive (if present) 2) drag basic icon out of window 3) close window, open basic 4) close List window 5) make the BASIC window very small 6) type clear,1024,1024 (maybe twice will help) 7) print fre(-1) (I get about 60104) 8) clear ,35000 (aproximatly) The problem or running AmigaBASIC in a 256k machine from the CLI is known. There is no known solution, you must run it from workbench or from a CLI under Workbench. Further I do not have an explanation for this. > >5. Can someone clarify the use of the terms STACK, HEAP, and PILE? Every >time I think I understand the distinctions I read something that un-clarifies >it for me. As I understand it, the 3 values for the AmigaBasic CLEAR command are: Unused, must be < 32k (figure that one out) Space for basic source code, variables, file blocks. "system stack" (I'm not sure, may be used to pass parameters to Amiga routines, to user subroutines,... --Good luck. --Bruce Barrett