Wiki source for reserveExtraCHeapBytes


Show raw source

======**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

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.

/* 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.
*/

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki