postgresql/src
Peter Eisentraut 2016055a92 Expand palloc/pg_malloc API for more type safety
This adds additional variants of palloc, pg_malloc, etc. that
encapsulate common usage patterns and provide more type safety.

Specifically, this adds palloc_object(), palloc_array(), and
repalloc_array(), which take the type name of the object to be
allocated as its first argument and cast the return as a pointer to
that type.  There are also palloc0_object() and palloc0_array()
variants for initializing with zero, and pg_malloc_*() variants of all
of the above.

Inspired by the talloc library.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/bb755632-2a43-d523-36f8-a1e7a389a907@enterprisedb.com
2022-09-12 08:45:03 +02:00
..
backend Make eval statement naturally proof against perltidy 2022-09-12 11:59:43 +07:00
bin Add psql tab compression for ALTER TABLE .. { OF | NOT OF } 2022-09-10 17:22:29 +09:00
common Replace load of functions by direct calls for some WIN32 2022-09-09 10:52:17 +09:00
fe_utils Clean up inconsistent use of fflush(). 2022-08-29 13:55:41 -04:00
include Expand palloc/pg_malloc API for more type safety 2022-09-12 08:45:03 +02:00
interfaces Fix possible omission of variable storage markers in ECPG. 2022-09-09 15:34:04 -04:00
makefiles aix: No need to use mkldexport when we want to export all symbols 2022-09-09 19:11:49 -07:00
pl Bump minimum version of Bison to 2.3 2022-09-09 12:31:41 +07:00
port Cleanup more code and comments related to Windows NT4 (XP days) 2022-08-30 09:52:58 +09:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Choose FK name correctly during partition attachment 2022-09-08 13:17:02 +02:00
timezone Expand the use of get_dirent_type(), shaving a few calls to stat()/lstat() 2022-09-02 16:58:06 +09:00
tools Bump minimum version of Flex to 2.5.35 2022-09-09 12:55:23 +07:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Remove unused configure variable. 2022-08-18 11:22:13 -04:00
Makefile.shlib aix: No need to use mkldexport when we want to export all symbols 2022-09-09 19:11:49 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00