Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ames!husc6!uwvax!dogie!yahnke@vms.macc.wisc.edu From: yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) Newsgroups: comp.sys.mac.programmer Subject: NewHandle & No Memory Message-ID: <1061@dogie.edu> Date: 6 Jan 89 04:58:06 GMT Sender: news@dogie.edu Organization: University of Wisconsin Academic Computing Center Lines: 27 application I'm writing I always check MemError() after each NewHandle call to see if there were allocation problems; when the application heap gets low, NewHandle should fail, MemError will tell me so, and I exit out gracefully. But in one case this doesn't work. I'm allocating mem for an offscreen image for each window I open, about 50K a shot. After a couple of windows, there's little heap left, TMON tell me there's just a few hundred bytes. I do another new window and consequently a HewHandle. Now, NewHandle should fail, right? And set MemErr to nonzero... but instead it just bombs, NewHandle never returns. When I start my program I init the SetGrowZone() thingy so as to call SysErr(25), and when I'm not running TMON, I get the standard error bomb dialog. Thus I suspect my Mac is having serious problems allocating memory...but NewHandle shouldn't just crap out, should it? Will it only fail gracefully if there's a lot of memory left but not as much as requested? I'm using LSC 3.0, w/Sys 6.0.2 running under MultiFinder w/2 1/2 megs, on a Mac+. Any comments would be appreciated. --muchos gracias //////////////////////////////////////////////////////////// Internet: yahnke@vms.macc.wisc.edu Bitnet: yahnke@wiscmacc(.bitnet) UUCP: {backbone}!uwvax!vms.macc.wis.edu!yahnke ////////////////////////////////////////////////////////////