Re: Add malloc attribute to memory allocation functions - Mailing list pgsql-hackers

From solai v
Subject Re: Add malloc attribute to memory allocation functions
Date
Msg-id CAF0whucTdOZNshgQWVTZ3GfO0w6=yzPCZNJCkeTnXY7j_n9o+w@mail.gmail.com
Whole thread
In response to Add malloc attribute to memory allocation functions  ("Tristan Partin" <tristan@partin.io>)
List pgsql-hackers
Hi Tristan,
I tested this patch on the current master branch.
Before applying the patch, I checked that functions like palloc(),
MemoryContextAlloc(), and pstrdup() were not annotated with a malloc
attribute.
After applying the patch, I verified that pg_attribute_malloc is added
in src/include/c.h and that the relevant backend and frontend memory
allocation functions are annotated appropriately. I also confirmed
that functions intended to be freed with pfree() use
pg_attribute_malloc(pfree), while the frontend allocation functions
use pg_attribute_malloc(pg_free).
The patch applied cleanly, PostgreSQL built successfully, and make
check completed successfully with all 245 tests passing. I didn't
notice any regressions during testing.

Thanks for working on this patch.

Regards,
Solai



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: DOCS - Clarify that REFRESH SEQUENCES might be using stale publication data
Next
From: Tom Lane
Date:
Subject: Re: Add malloc attribute to memory allocation functions