Win32: reduce environment array reallocations
commit1a44adcd0f6130eb6939a0003ac510ab80853008
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 6 Apr 2012 21:49:41 +0000 (6 16:49 -0500)
treeb08ac44fd8462a864652004a33e0c9fea628de48
parentb2c76b0bc90e2f1b93cacaa36ea4a922b7dc1314
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