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. 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. 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 :) -- #define X(x,y) x##y Peter Cordes ; e-mail: X([EMAIL PROTECTED] , ns.ca) "The gods confound the man who first found out how to distinguish the hours! Confound him, too, who in this place set up a sundial, to cut and hack my day so wretchedly into small pieces!" -- Plautus, 200 BCE