[Mono-dev] WindowsBase in mcs

Paolo Molaro lupus at ximian.com
Tue Nov 11 07:14:47 EST 2008

On 11/10/08 Alan McGovern wrote:
> The only other option is for there to be a place on disk which is:
> A) Guaranteed to be writable
> B) Guaranteed to have enough space to create the package.
> If those guarantees can be given, I'll gladly make the change. If they
> can't, then I don't want to completely break this API just to save memory.

This argument is ridiculous. How do you guarantee with the current code
that you have enough RAM available instead?
You can use /tmp: if there is not enough disk space you'll throw an
And there is nothing here that would break the API: the API does not
require nor does it guarantee that all the data is kept in memory.
Please don't make up excuses: keeping the data in memory is simply a bug
in the current code and as such it should be fixed.

On 11/10/08 Alan McGovern wrote:
> If you're actually writing the package to disk, you need free space == size
> (package) * 2 as you will have to store a temporary full copy of the package
> as well as the final copy.

This is not true in the common case: you write the data to the disk file
once and at the end you write the zip directory. At the end of the
process you can rename from the temp file to the destination file, for
If somebody does something stupid like removing streams after they have
been added, they'll also pay the price of the additional overhead.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list