diff options
author | Tom Lane | 2021-10-21 21:08:53 +0000 |
---|---|---|
committer | Tom Lane | 2021-10-21 21:08:53 +0000 |
commit | b1ce6c284366ce1dae120f5d10dd59e8804322ee (patch) | |
tree | b6786d31417dcf765648f014e70220cda499d1c7 | |
parent | 0c04342b1d3dd5b24f795f94874163be8e21710e (diff) |
Doc: clarify a critical and undocumented aspect of simplehash.h.
I just got burnt by trying to use pg_malloc instead of pg_malloc0
with this. Save the next hacker some time by not leaving this
API detail undocumented.
-rw-r--r-- | src/include/lib/simplehash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/lib/simplehash.h b/src/include/lib/simplehash.h index f6cbcd8c17..60ab472540 100644 --- a/src/include/lib/simplehash.h +++ b/src/include/lib/simplehash.h @@ -41,7 +41,7 @@ * - SH_SCOPE - in which scope (e.g. extern, static inline) do function * declarations reside * - SH_RAW_ALLOCATOR - if defined, memory contexts are not used; instead, - * use this to allocate bytes + * use this to allocate bytes. The allocator must zero the returned space. * - SH_USE_NONDEFAULT_ALLOCATOR - if defined no element allocator functions * are defined, so you can supply your own * The following parameters are only relevant when SH_DEFINE is defined: |