postgresql/src/bin/initdb
Tom Lane 4fe2aa7656 Reduce memory leakage in initdb.
While testing commit 3e51b278d, I noted that initdb leaks about a
megabyte worth of data due to the sloppy bookkeeping in its
string-manipulating code.  That's not a huge amount on modern machines,
but it's still kind of annoying, and it's easy to fix by recognizing
that we might as well treat these arrays of strings as
modifiable-in-place.  There's no caller that cares about preserving
the old state of the array after replace_token or replace_guc_value.

With this fix, valgrind sees only a few hundred bytes leaked during
an initdb run.

Discussion: https://postgr.es/m/2844176.1674681919@sss.pgh.pa.us
2023-03-22 14:28:45 -04:00
..
po Update copyright for 2023 2023-01-02 15:00:37 -05:00
t Add "-c name=value" switch to initdb. 2023-03-22 13:49:05 -04:00
.gitignore Move wchar.c and encnames.c to src/common/. 2020-01-16 15:58:55 -05:00
Makefile Use ICU by default at initdb time. 2023-03-09 10:52:41 -08:00
findtimezone.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
initdb.c Reduce memory leakage in initdb. 2023-03-22 14:28:45 -04:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
nls.mk Break up long GETTEXT_FILES lists 2023-03-08 15:05:43 +01:00