Revision [204]

This is an old revision of sqShrinkMemoryBy made by JohnMcIntosh on 2008-10-17 01:17:44.

 

sqInt sqShrinkMemoryBy(sqInt oldLimit, sqInt delta)


Parms:
oldLimit current end of oops memory limit
delta how much to shrink by
return: new limit, or old limit if failure
From: Interpreter
Why:
To shrink the oops space

Responsibility:
This logic comes from windows

MacIntosh
os-9/OSXCarbon
Just slide the pointer downwards, exploit sqGrowMemoryBy using a negative number
Cocoa:
TBD

iPhone
Just slide the pointer downwards, exploit sqGrowMemoryBy using a negative number

Unix
may use mmap to remap the memory size, but this is unlikely since that logic is turned off by default, otherwise
Just slide the pointer downwards

Windows
Use VirtualFree to free memory, if it fails return the old limit

BUGS

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki