[Vm-dev] Spur support for restricted memory footprint

tim Rowledge tim at rowledge.org
Thu Jan 8 05:48:47 UTC 2015


On 05-01-2015, at 12:24 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 
> Mac:			usqLong gMaxHeapSize
> Plan9/Unix:	long extraMemory
> RiscOS:		long objectHeadroom
> win32:		DWORD dwMemorySize

History; originally the memory allocation was purely the platform’s job and the only interface was the macro allocateMemoryMinimumImageFileHeaderSize which in bizarre turn used sqAllocateMemory unless it was previously defined. Yeah, I always thought it was stupid too. And I see that ‘memory’ is a usqInt in the trunk code, so ‘long’ etc really ought to have caused complaints.. .but C compilers…
Oh, I see you have static char * allocateMemoryminimumimageFileheaderSize in gcc3x-cointerp.c (as of VMMaker.oscog-eem.951 anyway) and cast it to usqInt. 

There’s lots of this stuff. As I imagine you’ve noticed. We should do better.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Debugger: A tool that substitutes afterthought for forethought.




More information about the Vm-dev mailing list