This VM has a number of fundamental changes and can be found
via ftp or my idisk at http://www.smalltalkconsulting.com/squeak.html (a) I have changed how image files are read. Users should verify the VM still will load and work with their current images on their current systems. I have tested with macintel on 10.5.x and powerpc on 10.4.x but have NOT tested on a 10.3.x powerpc system, if some 10.3.x user could do that it would be appreciated. (b) I no longer cwd (change working directory) at startup time to the VM directory, and I added a change so if the image name is for example Squeak.image we attempt to find that in the VM directory. This change *should* enable the ablility to launch a VM and image and startup file from a command line using relative file paths, versus having to give absolute paths. Users are welcome to test and confirm this feature works as expected with relative and absolute paths for the image and startup file. Memory allocation background: In the past we have read the image file into a pre-allocated chunk of memory allocated via mmap, now I have changed to a more complicated but faster method of reading which then allows us to someday depending on your VM to avoid re-swizzling pointers for an image that is launched on a unix, windows, or iPhone since all oops should start on the 500MB boundary. What happens is we mmap the image file with copy on write mmap into a segment of memory starting at a real address of 500MB (500*1024*1024), the next virtual memory page follow the size of the file then is anonymously mmap upto the maximum memory size choosen for the implmentation. In this case we allocate 512MB of memory which is a settable option in the info.plist. Because of mmap differences between operating systems, and versions of operating systems I cannot say if this will work on your favourite device, but it does seem to work on os-x 10.4 & 10.5 for powerpc and macintel, plus on iPhone 2.x. Post loading we check to see if the memory start location is the same as the memory start location when the image was saved. If not then we adjust all oops pointers by the difference in addresses. If the saved image was at the 500MB boundary then we do not need to walk all the oops to swizzle pointers, this saves some CPU cycle and becomes important on slow devices like the iPhone, or when we want to use Squeak as a scripting engine and expect really fast startup. -- = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
On Oct 29, 2008, at 2:31 AM, John M McIntosh wrote: > This VM has a number of fundamental changes and can be found > via ftp or my idisk at http://www.smalltalkconsulting.com/squeak.html > > (a) I have changed how image files are read. > > Users should verify the VM still will load and work with their > current images on their current systems. I have tested with macintel > on 10.5.x and powerpc on 10.4.x but have NOT tested on a 10.3.x > powerpc system, if some 10.3.x user could do that it would be > appreciated. > > (b) I no longer cwd (change working directory) at startup time to > the VM directory, and I added a change so if the image name is for > example Squeak.image we attempt to find that in the VM directory. > This change *should* enable the ablility to launch a VM and image > and startup file from a command line using relative file paths, > versus having to give absolute paths. cool thanks I will try that.! > > > Users are welcome to test and confirm this feature works as expected > with relative and absolute paths for the image and startup file. > > Memory allocation background: > > In the past we have read the image file into a pre-allocated chunk > of memory allocated via mmap, now I have changed to a more > complicated but faster method of reading which then allows us to > someday depending on your VM to avoid re-swizzling pointers for an > image that is launched on a unix, windows, or iPhone since all oops > should start on the 500MB boundary. > > What happens is we mmap the image file with copy on write mmap into > a segment of memory starting at a real address of 500MB > (500*1024*1024), the next virtual memory page follow the size of the > file then is anonymously mmap upto the maximum memory size choosen > for the implmentation. In this case we allocate 512MB of memory > which is a settable option in the info.plist. > > Because of mmap differences between operating systems, and versions > of operating systems I cannot say if this will work on your > favourite device, but it does seem to work on os-x 10.4 & 10.5 for > powerpc and macintel, plus on iPhone 2.x. > > Post loading we check to see if the memory start location is the > same as the memory start location when the image was saved. If not > then we adjust all oops pointers by the difference in addresses. If > the saved image was at the 500MB boundary then we do not need to > walk all the oops to swizzle pointers, this saves some CPU cycle and > becomes important on slow devices like the iPhone, or when we want > to use Squeak as a scripting engine and expect really fast startup. > > -- > = > = > = > = > = > ====================================================================== > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. http:// > www.smalltalkconsulting.com > = > = > = > = > = > ====================================================================== > > > > > |
Hi John,
I'm adopting this VW for daily use, we'll see if it breaks :) The only problem I had is it still doesn't contain the BitBlt plugin which is needed for freetype fonts. What happened is the VM stopped during launch (before displaying its window, hogging the cpu. Can you ship future VMs with the additional plugins included (at least BitBlt, and maybe Curl and AIO too would be useful) ? On Wed, Oct 29, 2008 at 8:13 AM, stephane ducasse <[hidden email]> wrote: > > On Oct 29, 2008, at 2:31 AM, John M McIntosh wrote: > >> This VM has a number of fundamental changes and can be found >> via ftp or my idisk at http://www.smalltalkconsulting.com/squeak.html >> >> (a) I have changed how image files are read. >> >> Users should verify the VM still will load and work with their current >> images on their current systems. I have tested with macintel on 10.5.x and >> powerpc on 10.4.x but have NOT tested on a 10.3.x powerpc system, if some >> 10.3.x user could do that it would be appreciated. >> >> (b) I no longer cwd (change working directory) at startup time to the VM >> directory, and I added a change so if the image name is for example >> Squeak.image we attempt to find that in the VM directory. This change >> *should* enable the ablility to launch a VM and image and startup file from >> a command line using relative file paths, versus having to give absolute >> paths. > > cool thanks I will try that.! > >> >> >> Users are welcome to test and confirm this feature works as expected with >> relative and absolute paths for the image and startup file. >> >> Memory allocation background: >> >> In the past we have read the image file into a pre-allocated chunk of >> memory allocated via mmap, now I have changed to a more complicated but >> faster method of reading which then allows us to someday depending on your >> VM to avoid re-swizzling pointers for an image that is launched on a unix, >> windows, or iPhone since all oops should start on the 500MB boundary. >> >> What happens is we mmap the image file with copy on write mmap into a >> segment of memory starting at a real address of 500MB (500*1024*1024), the >> next virtual memory page follow the size of the file then is anonymously >> mmap upto the maximum memory size choosen for the implmentation. In this >> case we allocate 512MB of memory which is a settable option in the >> info.plist. >> >> Because of mmap differences between operating systems, and versions of >> operating systems I cannot say if this will work on your favourite device, >> but it does seem to work on os-x 10.4 & 10.5 for powerpc and macintel, plus >> on iPhone 2.x. >> >> Post loading we check to see if the memory start location is the same as >> the memory start location when the image was saved. If not then we adjust >> all oops pointers by the difference in addresses. If the saved image was at >> the 500MB boundary then we do not need to walk all the oops to swizzle >> pointers, this saves some CPU cycle and becomes important on slow devices >> like the iPhone, or when we want to use Squeak as a scripting engine and >> expect really fast startup. >> >> -- >> >> =========================================================================== >> John M. McIntosh <[hidden email]> >> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com >> >> =========================================================================== >> >> >> >> >> > > > -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet |
In reply to this post by johnmci
picoLARC will have a C like dialect of Lisp in it. ( sourceforge.net ) I would like to write a VM for picoLARC in this dialect of Lisp. So I would like to learn about the Windows version of the Squeak VM.
How do I do that?
Where do I start?
Are there test cases that I could step through?
What do I need to compile it?
Is there a visual debugger I can use to step through the C parts?
If I could understand it then I would like to help document it. If possible.
On Tue, Oct 28, 2008 at 5:31 PM, John M McIntosh <[hidden email]> wrote: This VM has a number of fundamental changes and can be found |
On Sun, Nov 09, 2008 at 12:24:56AM -0800, Kjell Godo wrote:
> picoLARC will have a C like dialect of Lisp in it. ( sourceforge.net ) I > would like to write a VM for picoLARC in this dialect of Lisp. So I would > like to learn about the Windows version of the Squeak VM. > How do I do that? > Where do I start? > Are there test cases that I could step through? > What do I need to compile it? > Is there a visual debugger I can use to step through the C parts? > > If I could understand it then I would like to help document it. If > possible. You can get some good general background by reading the "Back to the Future" paper: http://users.ipa.net/~dwighth/squeak/oopsla_squeak.html The book "Squeak, Open Personal Computing and Multimedia" by Guzdial and Rose provides a lot of information (old but still generally valid). The VM itself is written mosting in Smalltalk, so to browse the code you should load the VMMaker package into your Squeak image. The remaining support code is maintained at http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/, and Windows related information is at http://squeakvm.org/win32/. I am not aware of anyone using a Squeak VM to directly host some other language, so I can't comment on how feasible this is. However, it is fairly common for people to implement languages such as Lisp or Prolog directly in Squeak itself; in other words, write the language in Smalltalk rather than in C, and run that on the Squeak VM. Dave |
In reply to this post by johnmci
> > In the past we have read the image file into a pre-allocated chunk > of memory allocated via mmap, now I have changed to a more > complicated but faster method of reading which then allows us to > someday depending on your VM to avoid re-swizzling pointers for an > image that is launched on a unix, windows, or iPhone since all oops > should start on the 500MB boundary. > > What happens is we mmap the image file with copy on write mmap into > a segment of memory starting at a real address of 500MB > (500*1024*1024), the next virtual memory page follow the size of the > file then is anonymously mmap upto the maximum memory size choosen > for the implmentation. In this case we allocate 512MB of memory > which is a settable option in the info.plist. I had a chance to evaluate the impact of this on an older powerbook G3, what I found is the traditional way of doing things required just about 550 ms of time as it reads in the image and iterates over the objects. After the change and saving the image so that you've a 500MB start location, that 550ms of time is reduced to about 125ms. On slower devices like the iphone the improvement is measured in seconds. -- = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
Free forum by Nabble | Edit this page |