Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!usenet From: Ron Smith Newsgroups: comp.sys.mac.programmer Subject: Memory allocation Message-ID: <1991Jun17.212601.6902@ux1.cso.uiuc.edu> Date: 17 Jun 91 21:26:01 GMT Sender: usenet@ux1.cso.uiuc.edu (News) Organization: UIUC Lines: 27 This is a pretty simple question, and I've been getting along fine without asking, but I'm starting to get curious, how does one allocate all the memory possible to 1 pointer. I've been using these 2 lines I found in someone else's source (I don't think they should mind)... size=MaxMem (&grow); size-=65536; now, do a NewPtr (size); actually, it used to be: size=MaxMem (&grow); size-=32768; (for one code segment?) but I doubled the number to accommodate 2 code segments, the one currently active, and the main one, since I wasn't doing this from the main one. The "size-=32768" IS to not run over the main code segment, right? anyways, it seemed somewhat silly to include the current code segment as purgeable space, I can't think of any instance when you would want to allocate over it. So my question is, is there another way to allocate all the space possible (not including any active code segments)? --RS (rps32513@uxa.cso.uiuc.edu)