On Thu, Apr 19, 2001 at 08:35:53PM -0300, Peter Cordes wrote: > On Thu, Apr 19, 2001 at 04:56:46AM -0800, Ethan Benson wrote: > > (though vmware has an interesting > > system where the disk image is no larger then the ammount of data it > > holds, it grows as you add data, until you hit the preconfigured > > limit). > > Can't you achieve the same result fairly easily with sparse files? Just > create it by seeking to the end (the size you want it), and write one byte. > Linux won't allocate disk blocks for regions of the disk that have never > been written to. Uninitialized regions read() as full of zeros.
actually this had occured to me, i just never have gotten around to trying it. > I guess this wouldn't free up sectors that were no longer in use, so the > amount used would creep up and wouldn't go down when you deleted stuff from > the filesystem on the disk, even though it was not logically in use anymore. true, though i am not sure if vmware handles that case either. > To have a central macos image, you just need to mmap( ..., MAP_PRIVATE, ), > so your changes are made copy-on-write. (You might want to do this within > the program instead of leaving it to the kernel, so you could write changes > to disk instead of leaving them in memory. I don't know how well Linux's VM > would handle the situation, but if you had lots of swap space things should > work :) this part is beyond me it should be possible somehow but i wouldn't know how. -- Ethan Benson http://www.alaska.net/~erbenson/
pgpO81VRKs5UN.pgp
Description: PGP signature