Win32: reduce environment array reallocations
commit28158f8d18ef0add1356db1152660a6387658d7f
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 3 May 2012 16:13:32 +0000 (3 11:13 -0500)
tree3b8fbe1a5b58185cd666f46e5e1ada52a8c6a23f
parentceeb426742e23c8b521d51f5c3564d35c8957526
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