NJ_GOKEMEIJE@FANDM.BITNET (06/25/91)
>From: IN%"dant@ryptyde.cts.com" 24-JUN-1991 13:12:49.37 > >"Yes, also a STACK on the mac can only be upto 32K" > >A stack can only be up to 32K? Stack of what? The data structure in >general? What is the Amiga limit? > on the Macintosh the stack for each program: the structure in general can only be 32 K. On the Amiga, the stack can be anysize I believe: at least up to 100 K (matlab wants that) Any bigger on the MAC and it will run it the system heap. question: I believe every application has its own systemheap right? But there is a bigsystemheap which can be accessed using TempNewHandle() but in no other way right? Thanks, Nils Gokemeijer (NJ_GOKEMEIJE@FANDM.bitnet)
jcav@quads.uchicago.edu (john cavallino) (06/25/91)
In article <B5EF4924E000426C@FANDM> NJ_GOKEMEIJE@FANDM.BITNET writes: >>From: IN%"dant@ryptyde.cts.com" 24-JUN-1991 13:12:49.37 >> >>"Yes, also a STACK on the mac can only be upto 32K" >> >>A stack can only be up to 32K? Stack of what? The data structure in >>general? What is the Amiga limit? > >on the Macintosh the stack for each program: the structure in general >can only be 32 K. >On the Amiga, the stack can be anysize I believe: at least up to 100 K >(matlab wants that) >Any bigger on the MAC and it will run it the system heap. You are incorrect. A Mac application defaults to a certain min. stack size (between 8 and 16K, depending on the machine model) but it can allocate more space at startup if it likes. In fact, it can give itself over 90% of it's memory space as stack if it wants. The stack allocation is done by resetting the application heap limit, which is the maximum space available for dynamic allocation. Less application heap --> more stack space, and vice-versa. >question: I believe every application has its own systemheap right? >But there is a bigsystemheap which can be accessed using TempNewHandle() >but in no other way right? Your belief is incorrect. There is one System Heap, which is where private OS structures and other shared items are allocated. The space from which temporary memory is allocated belongs to the Process Manager (used to be Multifinder), and has nothing to do with the System Heap. -- John Cavallino | EMail: jcav@midway.uchicago.edu University of Chicago Hospitals | USMail: 5841 S. Maryland Ave, Box 145 Office of Facilities Management | Chicago, IL 60637 B0 f++ c+ g+ k s+(+) e+ h- pv (qv) | Telephone: 312-702-6900
torrie@cs.stanford.edu (Evan Torrie) (06/25/91)
NJ_GOKEMEIJE@FANDM.BITNET writes: >>From: IN%"dant@ryptyde.cts.com" 24-JUN-1991 13:12:49.37 >> >>"Yes, also a STACK on the mac can only be upto 32K" >> >>A stack can only be up to 32K? Stack of what? The data structure in >>general? What is the Amiga limit? >> >on the Macintosh the stack for each program: the structure in general >can only be 32 K. >On the Amiga, the stack can be anysize I believe: at least up to 100 K >(matlab wants that) >Any bigger on the MAC and it will run it the system heap. I don't think so. At least, it would seem strange, for example, that Think Pascal [which requires you to tell it the stack size because of its funky memory allocation in its own heap] lets you set the stack size to whatever you require. I've on many occasions, set it to 128K for some novice programmers in the lab who decided to pass around arrays as parameters to heavily recursive procedures. A stack can be any size so long as it doesn't run into the application's heap [the infamous System Err #28! Stack and heap have collided!] >question: I believe every application has its own systemheap right? No, there is only one system heap. That's why applications can share data by sticking it in the system heap. >But there is a bigsystemheap which can be accessed using TempNewHandle() >but in no other way right? The memory obtained via TempNewHandle is essentially outside of the system zone and all application zones, in some unused part of memory. -- ------------------------------------------------------------------------------ Evan Torrie. Stanford University, Class of 199? torrie@cs.stanford.edu "And in the death, as the last few corpses lay rotting in the slimy thoroughfare, the shutters lifted in inches, high on Poacher's Hill..."
dant@ryptyde.UUCP (Daniel Tracy) (06/26/91)
Responding to the following: "on the Macintosh the stack for each program: the structure in general can only be 32 K." What is this stack used for? "question: I believe every application has its own systemheap right? But there is a bigsystemheap which can be accessed using TempNewHandle() but in no other way right?" No.