Win32: reduce environment array reallocations
commit4edc99242baf681ca5fb74028123906908d0cbcd
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerKarsten Blees <blees@dcon.de>
Sat, 4 Feb 2012 20:55:53 +0000 (4 21:55 +0100)
tree085d4634f3e7f20385a2c2616073d41287e2b4b3
parent89d642a086a2d8a02e00edfa909d0167face069b
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