Subject: Re: Error $201 on 8-bit apps From: dempson@actrix.gen.nz (David Empson) Date: Wed, Jul 29, 1998 9k39(H EDT Message-id: <1dcygag.1bdwcm02ehu10N@dempson.actrix.gen.nz> Brian Hammack wrote: > Hey folks, demonstrate that we still give support here. :) > > Okay, here's the deal. Recently every time I load the full System > and try to launch ProTerm with QuickLaunch, the computer makes like > it's going to run the program then bails to a screen that says I have > encountered error $201 (can't allocate memory) and reboots. But I can > run 16-bit programs without problems. Thought it might be just Quick- > Launch getting flaky, but when double-clicking any 8-bit apps' icons, > same thing happens: under full system load I can run GSHK but not > Shrink It 3.4. I can at least explain WHY this is happening. Error $0201 doesn't necessarily mean "not enough memory available". All it tells you is that a specific allocation request failed. When an application (or the system software) asks for a memory block from the Memory Manager, it specifies several parameters, including the size and option flags which indicate restrictions on how the memory can be allocated. Among these options are "allocate memory in a specified bank", "allocate memory at an exact address" (used to reserve screen memory, for example), and "allocate memory that is not 'special'" (i.e. not in banks 0, 1, $E0 or $E1). The problem you have encountered can be summarised as follows: 1. Some extension or part of the system software has caused memory to be allocated in bank 0 or 1. 2. When GS/OS starts up ProDOS-8, it needs to reserve all of banks 0 and 1 so that no allocation can step on the standard 8-bit memory areas. Memory in these areas tend to be reserved for items such as direct page/stack segemnts for applications, but they are supposed to be released when the application quits. GS/OS itself also uses memory in these areas for generated device drivers, buffers, etc., which is all released before ProDOS-8 is launched. 3. The memory allocated in step 1 is preventing all of bank 0 or 1 from being allocated to the system, so the Memory Manager returns error $0201. 4. This is a fatal error that GS/OS cannot cope with, so it forces a system crash. The question is: which system extension is causing this to happen? I can only suggest continuing in the vein you have started - use Skip'Em or manual disables to pinpoint the Init, driver, Control Panel, or whatever that is tying up memory. It might be possible to identify the culprit using a tool such as Nifty List, but it could be tricky to do this at the right time. It might be possible in conjunction with GSBug, e.g. by trapping on the Quit call Finder makes to launch the ProDOS-8 application, and seeing what memory is reserved in banks 0 and 1 (between $0800 and $BFFF in each bank - the $0000-$7FFF and $C000-$FFFF areas are permanently reserved at system startup). > This only started happening in the last week and I haven't added > anything to the System sequence in a month (all worked fine under a > full boot prior to a week ago!). Suggestions, ideas? Has one of my > memory-based doodads (CDevs, DA's, Extras) suddenly gone wonky on me? Perhaps you have changed a setting which has this side effect? Otherwise it could be a bug that has just appeared, or something is damaged (as you suggest). -- David Empson dempson@actrix.gen.nz Snail mail: P.O. Box 27-103, Wellington, New Zealand