Use C23 free_sized especially with short lived data (more so in tight loops), discussion for later
未关闭
还没有人认领这个 Issue。
Feature
Status: Needs Triage
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
To see for the next major release (likely 9.0) and giving the time for the various libcs to actually implement it.
We bother giving an explicit size, the benefit doing so is performance. Indeed, the underlying memory allocator does not need to read the metadata to figure out the block size in that case.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位 PHP 当前显式指定大小的释放点,并检查哪些目标 libc 支持 C23 free_sized API。比较它对短生命周期分配和紧密循环的潜在影响,然后确定可能的 9.0 版本所需的兼容性和范围。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c
- 领域
- backend
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100