Commit f706089dce for perl
commit f706089dce566d8fe1e124fcd1cc74cb60ed7015
Author: Richard Leach <rich+perl@hyphen-dash-hyphen.info>
Date: Thu Sep 10 10:44:09 2026 +0000
bodies_by_type: SVt_PVFM bodies use an arena, just like all other bodies
On a build that uses SV arenas, only the SVt_PVFM body is allocated,
with all other types being bodiless (e.g. SVt_IV) or using arenas.
Hot functions that add or remove bodies therefore have to perform a
check - which is effectively for a rare type - every time and contain
code to deal with both arenas & allocations.
This commit makes this body type also use an arena, allowing for
simplification of any core function that adds or removes a body.
diff --git a/sv_inline.h b/sv_inline.h
index 272c791ef4..b78bc806e8 100644
--- a/sv_inline.h
+++ b/sv_inline.h
@@ -281,7 +281,7 @@ static const struct body_details bodies_by_type[] = {
{ sizeof(ALIGNED_TYPE_NAME(XPVFM)),
sizeof(XPVFM),
0,
- SVt_PVFM, TRUE, NONV, NOARENA,
+ SVt_PVFM, TRUE, NONV, HASARENA,
FIT_ARENA(20, sizeof(ALIGNED_TYPE_NAME(XPVFM))) },
{ sizeof(ALIGNED_TYPE_NAME(XPVIO)),