Win32: reduce environment array reallocations
commit81dd4fd2b6ceaea3c927ea7611596314d937de93
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 30 Mar 2012 18:44:00 +0000 (30 13:44 -0500)
tree24e47e4e8d5bccf5f12cfb72e8abfe14a393a703
parent0659189110f7eeb25e1d4360df8c9cdd818a4ca4
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