Win32: reduce environment array reallocations
commit10f505665ca4b70515c252395b714e3dc347bd1e
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerStepan Kasal <kasal@ucw.cz>
Thu, 29 May 2014 08:40:23 +0000 (29 10:40 +0200)
treeb5823b467a1ce4af28016bd98d44dba6bad76cd7
parente6e3f76686f8036578f994427541b26a7e20be4d
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