Re: Expand palloc/pg_malloc API
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-28T17:22:39Z
Lists: pgsql-hackers
Attachments
- v2-0001-Expand-palloc-pg_malloc-API-for-more-type-safety.patch (text/plain) patch v2-0001
- v2-0002-Assorted-examples-of-expanded-type-safer-palloc-p.patch (text/plain) patch v2-0002
On 12.08.22 09:31, Peter Eisentraut wrote: > In talloc, the talloc() function itself allocates an object of a given > type. To allocate something of a specified size, you'd use > talloc_size(). So those names won't map exactly. I'm fine with > palloc_object() if that is clearer. > I think the _ptrtype variant isn't that useful anyway, so if it's > confusing we can leave it out. I have updated this patch set to rename the _obj() functions to _object(), and I have dropped the _ptrtype() variants. I have also split the patch to put the new API and the example uses into separate patches.
Commits
-
Add repalloc0 and repalloc0_array
- b4b7ce8061d3 16.0 landed
-
Expand palloc/pg_malloc API for more type safety
- 2864f7755611 10.23 landed
- e962235fe1f6 11.18 landed
- 7dd9b469bc56 12.13 landed
- 172882292451 13.9 landed
- b7f37af7c195 14.6 landed
- 7fe55d5e12b6 15.0 landed
- 2016055a92f2 16.0 landed
-
Assorted examples of expanded type-safer palloc/pg_malloc API
- 5015e1e1b58f 16.0 landed