Win32: reduce environment array reallocations
commit17eb945683b50cbf0f0101b92e25f7e4d240a131
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 1 Oct 2012 13:35:04 +0000 (1 14:35 +0100)
tree42ff4e1010a0a1348905d647a571caaf81c2a258
parent93b85d13cb6bec0360f1cf9d729fd9594e456f2c
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