iSqueak Wikki : reserveExtraCHeapBytes

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Revision [252]

Most recent edit made on 2008-10-18 01:59:18 by JohnMcIntosh

Additions:
/* Note: This macro can be redefined to allows platforms with a
fixed application memory partition (notably, the Macintosh)
to reserve extra C heap memory for special applications that need
it (e.g., for a 3D graphics library). Since most platforms can
extend their application memory partition at run time if needed,
this macro is defined as a noop here and redefined if necessary
in sqPlatformSpecific.h.
*/




Revision [251]

Edited on 2008-10-18 01:59:00 by JohnMcIntosh

Additions:
However if you are using an operating system which provides only a limited heap space for your application you might need to consider using this feature.




Revision [250]

The oldest known version of this page was edited on 2008-10-18 01:58:01 by JohnMcIntosh

reserveExtraCHeapBytes(origHeapSize, bytesToReserve)


This is a define

#define reserveExtraCHeapBytes(origHeapSize, bytesToReserve) origHeapSize

it is defined on the Macintosh historically as

#define reserveExtraCHeapBytes(origHeapSize, bytesToReserve) (origHeapSize - bytesToReserve)

The reason for this value was to ensure the pre OS-X macintosh operating system would ensure that space would be reserved in the application
heap for later loading of plugins, otherwise the squeak image oops space would be given most of the free space in the application. Although this
is still re-defined in the sqPlatformSpecfic.h for the macintosh it has no effect since we mmap 512MB or more of memory for Squeak to use under OS-X
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in -0.0289 seconds