- Notifications
You must be signed in to change notification settings - Fork28
Commit6f7c0ea
committed
Improve memory management for PL/Perl functions.
Unlike PL/Tcl, PL/Perl at least made an attempt to clean up after itselfwhen a function gets redefined. But it was still using TopMemoryContextfor the fn_mcxt of argument/result I/O functions, resulting in thepotential for memory leaks depending on what those functions did, and theretail alloc/free logic was pretty bulky as well. Fix things to use aper-function memory context like the other PLs now do. Tweak a couple ofplaces where things were being done in a not-very-safe order (on theprinciple that a memory leak is better than leaving global stateinconsistent after an error). Also make some minor cosmetic adjustments,mostly in field names, to make the code look similar to the way PL/Tcl doesnow wherever it's essentially the same logic.Michael Paquier and Tom LaneDiscussion: <CAB7nPqSOyAsHC6jL24J1B+oK3p=yyNoFU0Vs_B6fd2kdd5g5WQ@mail.gmail.com>1 parentd062245 commit6f7c0ea
1 file changed
+122
-115
lines changed0 commit comments
Comments
(0)