Win32: reduce environment array reallocations
commitb3a0c4132b8b829bc2de8cb266ea1d84ff277889
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 10 Apr 2014 18:52:14 +0000 (10 13:52 -0500)
tree83e821cf3de8a64ac5ecf1e6921159e269b1a7f3
parent60c47520800a0671419e899720dea6197510792f
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