At 8:05 AM -0800 4/8/99, Danko Radic wrote:
>1) What's the effective difference between global variable and allocating
>movable chunk (manual says 'use chunks instead of globals' to save heap
>space)? I mean, both are allocated in dynamic heap as I understand.

The global will be part of a fixed chunk that is allocated when your app
launches and not free'd 'till your app quits.  The movable chunk presumably
is only fixed when it's actually in use, so the OS will have a slightly
easier time managing the memory if it can move the chunk around, and
perhaps the lifetime of the data does not need to be the whole time your
app is running?

In general, if your data is going to be locked all the time, you might as
well use a fixed chunk (MemPtrNew).  And if it's going to exist as long as
your application is running, you might as well use a global.  There's
slightly less overhead for fixed chunks (no master pointer) and even less
for globals (merged into the same chunk as the other app globals, so no
memory manager header.)

>2) What's the easiest way to test pixel on screen if it's ON or OFF (to
>analize screen contents). I would prefer the way that is as much as
>possible in API spirit (well as much as it can be).

There's currently no API to do this, so you need to get the window's base
address out of the data structures and do the math to find and mask out the
pixel yourself.  (If you do this, I'd recommend you use the displayAddrV20
field in thw WindowType struct rather than try to look inside the
GDevicePtr, and pay attention to the bits per pixel of the screen.  If you
do, you'll stand a better chance of being compatible with future OS
releases.)

>3) Does anyone know for some routines for writing text string VERTICALLY?

Nothing in the OS.

                                        --Bob

_______________________________________________________________________
Bob Ebert, Sr. Software Engineer, Palm Computing Inc., 3Com Corporation
V: 408 326-9299  5400 Bayfront Plaza, MS: 10212, Santa Clara, CA, 95052
F: 408 326-9891,  [EMAIL PROTECTED]  (preferred: [EMAIL PROTECTED])


Reply via email to