Piers Cawley wrote:
alloc_and_link( void ** handle, size_t size);
This is covered in Steve Finks summary as solution 3.
There were also two code snippets by Brent Dax and Jerome Vouillon, that deal with exception handling too. s. thread "Infant mortality" started by Steve.
Note that NULLing the scratch handles could potentially be moved out into the main oploop, making life easier for the programmer.
This is not an option, it would make the whole runloop slower. It does also not work, when a PMC calls out to interpreted code, this would then unanchor the handles.
But I still favor the combination of:
- code reordering, like done for pmc_new
- DOD/GC disabling (e.g. aggregate clone)
- active anchoring to the root set, where above is not applicable
leo