[Vm-dev] what about image reading?

Tobias Pape Das.Linux at gmx.de
Fri Jan 14 11:10:23 UTC 2011


Am 2011-01-13 um 22:45 schrieb Eliot Miranda:
[…]
> 
> You're not searching all the C code ;)  readImageFromFile:HeapSize:StartingAt: is called from the C main routine, and the C main routine is not generated.  See platforms/{Mac OS,iOS,win32,unix}/vm
>  

Ok. I got that. Apologies, it was my fault, obviously.

> McStalker.oscogvm$ grep readImageFromFile platforms/*/vm/*
> platforms/Cross/vm/sq.h:sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);
> platforms/Cross/vm/sq.h:#define readImageFromFileHeapSize(f, s) readImageFromFileHeapSizeStartingAt(f,s,0)

ok. the definitions.

> platforms/Mac OS/vm/sqMacMain.c:        readImageFromFileHeapSizeStartingAt(f, sqGetAvailableMemory(), 0);
> platforms/Mac OS/vm/sqMacNSPluginUILogic.c:     readImageFromFileHeapSizeStartingAt(f, squeakHeapMBytes, 0);

So, the Carbon vm is _not_ dealing with the 512 offset?

> platforms/unix/vm/sqUnixMain.c:      readImageFromFileHeapSizeStartingAt(f, extraMemory, 0);

and, most curiously, the unix-VM isn't either?

> platforms/win32/vm/sqWin32Intel.c:      readImageFromFileHeapSizeStartingAt(imageFile, virtualMemory, 0);
> platforms/win32/vm/sqWin32Intel.c:      readImageFromFileHeapSizeStartingAt(imageFile, virtualMemory, sqImageFilePosition(imageFile));
> 

Ah, the Windows vm does.

I did one grep of my own and found:

vm	has 512b-offset-support
Carbon	no
Risc	no
Cocoa	no
unix	no
Win32	yes

So, while only the win32-vm is _able_ to read the offset images, wouldn't it make sense
to drop this feature altogether?

So Long,
	-Tobias


More information about the Vm-dev mailing list