Rust bindings: MiMalloc::allocate should return actual usable size
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 contrib/rust/src/allocator.rs 中当前正好返回 layout.size() 的 allocate 方法附近开始,并阅读链接的 purpleprotocol nightly_allocator_api.rs 以了解该模式。检查 mimalloc 如何通过同一 crate 中现有的 FFI 绑定暴露其可用大小函数,然后改为返回该值。在 contrib/rust 中运行 cargo test;完成意味着分配器在仍然满足 Allocator 契约的同时报告更大的可用块。
由索引模型根据 Issue 内容生成。
描述
Connections
https://github.com/microsoft/mimalloc/issues/1405 - Support official Rust FFI bindings
Summary
The Rust bindings for mimalloc always return an allocation of exactly the requested size:
However, the allocator API says:
The returned block may have a larger size than specified by layout.size()
As such, I'd propose doing something similar to what purpleprotocol's Rust bindings do:
This would help improve the performance of collection types (like Vec) by allowing them to use the full space of the allocation.
- 主要语言
- C
- 星标
- 13.6k
- 派生
- 1.2k
- 平均合并
- 12 小时 35 分钟
- 30 天内合并 PR
- 18
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/mimalloc 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
Building mimalloc with `-Wundef` compiler flag logs many warnings on undefined macros可能已有人在做 @vstinner 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 64/100
microsoft/mimalloc#1506 · 5 条评论 ·
维护者通常 1 天内回复
-
stale
难度 2/5 1-3 小时 新手友好度 74/100
microsoft/mimalloc#1113 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/mimalloc#886 · 4 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
microsoft/mimalloc#368 · 1 条评论 ·
维护者通常 1 天内回复
查看 microsoft/mimalloc 的全部 Issue
相似的 Issue
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by default未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
FriendsofECCE/ECCE#1245 · 1 条评论 ·
-
Arch: ARM/AArch64 Doc
难度 1/5 1 小时以内 新手友好度 90/100
RT-Thread/rt-thread#12082 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/nuttx-apps#4108 · 4 条评论 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 84/100
VirtualBox/virtualbox#996 ·
维护者通常 6 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
trezor/trezor-firmware#8357 ·
维护者通常 2 天内回复