Win32: reduce environment array reallocations
commit5a4fa3460c2a04e9f3d828094a5b9172609fa917
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 20 May 2012 23:45:39 +0000 (20 17:45 -0600)
treeaa493ce0602dfe9728a068741013c54be0cbae2c
parent8cef62cf4de8362f0be993d786f0716443d17978
Win32: reduce environment array reallocations

Move environment array reallocation from do_putenv to the respective
callers. Keep track of the environment size in a global variable. Use
ALLOC_GROW in mingw_putenv to reduce reallocations. Allocate a
sufficiently sized environment array in make_environment_block to prevent
reallocations.

Signed-off-by: Karsten Blees <blees@dcon.de>
compat/mingw.c