[comp.sys.mac.programmer] Memory

siegel@endor.uucp (Rich Siegel) (01/31/91)

In article <15967@reed.UUCP> orpheus@reed.UUCP (P. Hawthorne) writes:

>    Even though it may be possible to pin down every time memory may get
>moved around, it takes a significant amount of thought and time to do so.

	In fact, it takes comparitively little of either, since all of the
traps that move memory are documented, and new ones are document as soon
as is practical. As for old ones suddenly starting to move memory, I doubt
that any action by Apple will cause this problem, since they rarely
break something so fundamental.

>    My largest problem with memory, now, is in overcoming the 32K limit on
>variables in Think Pascal. Right about now, I would kill or die to see the
>same attention that is being devoted to locking handles being devoted to
>dynamic length objects and arrays.
	
	Which 32K limitation? Variable size, local allocation, or global
allocation?

>    I can't reserve large block of memory without bombing, if I use it.
>Leave it alone and I never get a bad result. So maybe I'm overwriting the
>object identifier bytes at the end of the object. The manual has precious 

	The class ID is at the beginning of an object, not the end.
If you can be more specific about your crashes, that might lead us toward
a solution.

R.



 Rich Siegel	Symantec Languages Group  Internet: siegel@endor.harvard.edu

"...she's dressed in yellow, she says 'Hello, come sit next to me, you
fine fellow..."

orpheus@reed.UUCP (P. Hawthorne) (02/01/91)

>>     Even though it may be possible to pin down every time memory may get
>> moved around, it takes a significant amount of thought and time to do so.

>      In fact, it takes comparitively little of either, since all of the
>  traps that move memory are documented, and new ones are document as soon
>  as is practical. As for old ones suddenly starting to move memory, I doubt
>  that any action by Apple will cause this problem, since they rarely
>  break something so fundamental.

       Perhaps I should have said that it takes more time and thought than I
   want to divert from solving the problem at hand.

       Regarding memory movement, I assume I was mistaken. Sorry. I had been
   told that some traps which had not moved memory before, had begun to
   move memory in a recent release. It might have been in regard to an INIT
   that patched a trap.


>>     My largest problem with memory, now, is in overcoming the 32K limit on
>> variables in Think Pascal. Right about now, I would kill or die to see the
>> same attention that is being devoted to locking handles being devoted to
>> dynamic length objects and arrays.

>      Which 32K limitation? Variable size, local allocation, or global
>  allocation?

       Since you ask, my annoyance is at variable size. It is not that I
   mind working with memory, or pushing the boundaries of my pointers and
   handles out. It is more that I wish I could simply define an array and
   leave it at that. The limitation is reasonable in context, but I would
   not mind it being removed, if it were possible.

       The problem I had been having with dynamic length variables was 
   quite simple. Embarrassing, to tell the truth. I was using integers
   rather than longints, and was getting overflow errors. I should have
   remembered the warnings in the offscreen world and palette documentation
   about the same problem sooner.
       A simple correction and it works fine.
       Thanks for your response... It's nice to have Symantec represented.


       orpheus@reed