Win32: reduce environment array reallocations
commit5140042b213c641a47473f08d6ffe4f11fbc7030
authorKarsten Blees <blees@dcon.de>
Sun, 15 Jan 2012 23:00:35 +0000 (16 00:00 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 22 Oct 2012 12:30:47 +0000 (22 13:30 +0100)
treeb092ac6004ab4551ae1c80a7e8f32f73f1f73318
parentf7610513f83d1f2cf99afc685854665581a5df3c
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