“ 微软工程师发布 Rust Linux 内核补丁,以进行就地模块初始化 ”

发布时间:2024-03-28
今日阅读:0
来源:OSCHINA
作者:菠萝的海子
...

微软工程师 Wedson Almeida Filho 发布了一个针对 Rust Linux 内核代码的 Allocation API 的最新补丁,并利用这些提议的 API 来允许 Rust 内核模块进行就地模块初始化。Wedson Almeida Filho 一直是 Rust for Linux 的长期贡献者,最早可以追溯到他在 Google 工作的时候。 img 他解释道 > 我们目前我们有一个对 Vec 进行了修改的 crate fork其他更改已被上传到上游Rust 项目。本系列删除了分叉并将所有功能公开为扩展特征。 此外,它还向所有可能导致分配的函数例如 “Box::new”、“Arc::new”、“Vec::push”等引入了不带 try_ 前缀的 allocation flag 参数–这些名称之所以可用,是因为我们在构建 alloc 时使用了no_global_oom_handling。 最后,该系列还消除了我们对“allocator_api”不稳定功能的依赖。 从长远来看,我们仍然希望在上游 Rust 中提供此类功能,但这使我们现在就能够取得进展并减少维护负担。 总结 删除 alloc 分支 删除使用 allocator_api 不稳定功能 分配时引入标志例如 GFP_KERNEL、GFP_ATOMIC 在内核中为 Rust 提供的 Allocation API 工作的基础上,他还发布了 Rust 内核模块的就地模块初始化补丁。提出的补丁允许对模块进行就地初始化,而不是让模块返回一个被移动到最终内存位置的实例。

标签:
Rust Linux 补丁

每日一言

"<!doctype html> <html lang="Zh-cn"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex,nofollow"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="renderer" content="webkit"> <title>您请求的文件不存在!</title> <link type="text/css" rel="stylesheet" href="https://www.oick.cn/css/404.css" /> <link rel="shortcut icon" href="http://www.oick.cn/favicon.ico" type="image/x-icon" /> </head> <body> <div id="wrap"> <div> <img src="https://www.oick.cn/imgs/404.png" alt="404" /> </div> <div id="text"> <strong> <span></span> <a href="javascript:history.back()">返回上一页</a> </strong> </div> </div> <div class="animate below"></div> <div class="animate above"></div> </body> </html>"

...

站点统计

本周更新文章: 0 篇
文章总数: 59110 篇
今日访问量: 42665 次
访问总量: 184300 次