Thanks for that.  I was sure the info was out there, but had trouble
locating it using their search engine.. 8-)

FYI: I wrote this tiny bit of code to tell me a bit about the heap during my
programs start-up.

 Char  buffer[10];
 Int16  i;
 UInt32  x;
 UInt32  y;
 UInt32  z;

 DebugAlert("Analysing HEAP");
 i = MemNumHeaps(0);
 for (z=0; z < i; z++) {
  i = MemHeapID(0, z);
  if (MemHeapDynamic(i)) {
   x = MemHeapSize(i);
   StrIToA(buffer, x);
   DebugAlert(buffer);

   MemHeapFreeBytes(i, &x, &y);
   StrIToA(buffer, x);
   DebugAlert(buffer);

   StrIToA(buffer, y);
   DebugAlert(buffer);
  }
 }
 DebugAlert("Finished HEAP");

One weird thing I noticed is that the largest chunk available on a 1 meg 3.5
device with b&w screen is only about 10K, whereas the color device is 35K!!
This was causing the problem.  Anyone know why this is?  (David??)

I have resigned myself to presuming that 3.5 cannot be run in the real world
on anything under a 2 meg device, which is correct I think.  This way, the
heap is twice the size, and my program runs happily.

Regards,

Alan Ingleby
Systems Developer
ProfitLink Consulting Pty Ltd
309 Burwood Road
Hawthorn
Victoria 3122
"B. Cameron Lesiuk" <[EMAIL PROTECTED]> wrote in message
news:37063@palm-dev-forum...
>
> Check out the Programmer's Companion on the PalmOS web site
>
> http://www.palmos.com/dev/tech/docs/palmos/Memory.html
>
> You'll want to read the whole thing.
> The chart you're looking for is near the very bottom.
> -Cam
>
> Alan Ingleby wrote:
>
> > A) Is there a way to programmatically determine the Dynamic Heap size?
> > B) Is these a chart which shows the Dynamic Heaps sizes for OS3.5 when
> > installed on different machines, with different amounts of RAM?
> >
> > The reason I ask is that my program barfs when running on POSE due to
> > insufficient dynamic heap under OS3.5 EZ ROM with 1 meg of RAM, but
DOESN'T
> > when running the OS3.5 Color EZ ROM on 1 Meg of RAM.
> >
> > Regards,
> >
> > Alan Ingleby
> > Systems Developer
> > ProfitLink Consulting Pty Ltd
> > 309 Burwood Road
> > Hawthorn
> > Victoria 3122
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to