running directly from RAM on wince?

Raab, Andreas Andreas.Raab at disney.com
Tue May 29 03:18:01 UTC 2001


Noel,

> LOL  That's OK; we're on the same page now. 

Yup. Back to Craig's original question ;-) So as I see it you should be able
to basically map everything in, then run it. The only issue remaining is
that one must never quit without saving the image. In effect, the image
would always be an up-to-date memory snapshot and therefore the only thing
required would be to make sure that when you exit it you can start it again.
It might even work without a snapshot (to an extent, the question is what
happens to certain resources) but if you snapshot you should be perfectly
fine.

> I do note that to grown/shrink the allocation, we'd have to close it,
> allocate a new mapping, and re-map.

This might not even be a problem as long as CE doesn't commit mapped memory
before you even start using to it (if that's not true it might be possible
to play around with VirtualAlloc and see if that helps). As long as it
doesn't commit the memory before it is used you can simply map a large
enough region to reserve address space and keep some internal pointer that
tells you where the current end of the committed region is - effectively
that's what I'm doing too, only using VirtualAlloc for reserving the address
space and then handing out continuous portions of it. There *is* of course a
question what happens when your external storage has not enough capacity to
back the entire requested region - do you have any idea what happens in this
case?!

Cheers,
  - Andreas





More information about the Squeak-dev mailing list