← develop-02 9004 April 1990

develop-02 9004 April 1990

From the originals

13 scans

Machine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.

These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.

PDF page 12

FreeMemory This function returns the amount of free space in the PtrObject heap, as returned by the trap FreeMem . If no separate heap exists, this function will return the amount of free memory in the default (application) heap. MaxMemory This function returns the size of the largest free block in the PtrObject heap, as returned by the trap MaxMem . If no separate heap exists, this function will return the amount of free memory in the default (application) heap. operator new This function is called by the C++ compiler to allocate memory for PtrObject s. You never need to call it directly. operator delete This function is called by the C++ compiler to deallocate memory used by PtrObject s. You never need to call it directly. Here is the class declaration for PtrObject , which would normally be found in the header file PtrObject.h. class PtrObject { public: static OSErr AllocHeap(size_t heapSize); // Create a heap heapSize bytes long to allocate // objects in. static void DisposeHeap(); // Free up the heap allocated by a previous call // to AllocHeap. static long FreeMemory(); // Return the total amount of free space in the heap. static Size MaxMemory(); // Return the size of the largest free block in the heap. void* operator new(size_t size); void operator delete(void* p); // These are our special allocation and // deallocation operators. private: static THz fZone; // Our private zone pointer. }; d e v e l o p April 1990 122

Reading notes: Source appears to contain OCR-style spacing artifacts (e.g., 'd e v e l o p') and inline code formatting markers that may affect reading order.

Printed dates
April 1990
Languages
English