Merge 75787 - Improved memory usage while applying patch.
Reduced total size of allocations from 520MB to 318MB. The general technique is to allocate the correct size rather than grow into the correct size and overshoot. 1. Find file sizes and allocate buffers of that size for the input files. 2. Pre-allocate a buffer for the collected inputs for the final diff. 3. Calculate the size for (2) during compression and include it in the patch header. The courgette.exe command line tool now calls the same ApplyEnsemblePatch entry point that is called by the installer. This ensures measurements of courgette.exe are a better reflection of the installer. BUG=72459 Review URL: http://codereview.chromium.org/6546008 TBR=sra@chromium.org Review URL: http://codereview.chromium.org/6602017 git-svn-id: svn://svn.chromium.org/chrome/branches/648/src@76289 0039d316-1c4b-4281-b951-d872f2087c98
Showing
- courgette/courgette_tool.cc 42 additions, 10 deletionscourgette/courgette_tool.cc
- courgette/ensemble.h 2 additions, 1 deletioncourgette/ensemble.h
- courgette/ensemble_apply.cc 20 additions, 1 deletioncourgette/ensemble_apply.cc
- courgette/ensemble_create.cc 8 additions, 0 deletionscourgette/ensemble_create.cc
- courgette/streams.cc 14 additions, 2 deletionscourgette/streams.cc
- courgette/streams.h 10 additions, 2 deletionscourgette/streams.h
Please register or sign in to comment