Skip to content

Commit b1ce6c2

Browse files
committed
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.
1 parent 0c04342 commit b1ce6c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/lib/simplehash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* - SH_SCOPE - in which scope (e.g. extern, static inline) do function
4242
* declarations reside
4343
* - SH_RAW_ALLOCATOR - if defined, memory contexts are not used; instead,
44-
* use this to allocate bytes
44+
* use this to allocate bytes. The allocator must zero the returned space.
4545
* - SH_USE_NONDEFAULT_ALLOCATOR - if defined no element allocator functions
4646
* are defined, so you can supply your own
4747
* The following parameters are only relevant when SH_DEFINE is defined:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy