Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/37311

From BetaArchive Wiki
Knowledge Base


A Handle Points to a Pointer to a Macintosh Heap Block

Article ID: 37311

Article Last Modified on 1/8/2003



APPLIES TO

  • Microsoft QuickBasic Compiler for Macintosh 1.0



This article was previously published under Q37311

SUMMARY

Many of the Microsoft QuickBASIC Toolbox Library (MBLC) routines make use of handles for manipulating resources.

A handle is a pointer to a block of memory in the Macintosh heap. This pointing structure is used to allow dynamic memory allocation and management by the system to occur without creating havoc.

MORE INFORMATION

The Macintosh heap space is managed by the System dynamically. Parts of the heap can move around. The System can compress the information in the heap to one location, allowing a large continuous block of heap space for other applications.

A handle will actually point to a master pointer, which in turn points to a particular block in the heap. When the system performs its memory allocations and management, it only knows the location of the master pointer. It does NOT know the handle's location. Thus, when the memory block is moved, the master pointer is updated, which in effect updates the handle.


Additional query words: MQuickB

Keywords: KB37311