TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rust-for-Linux: The Success, Dissatisfaction, and Compromise

2 点作者 ladyanita228 个月前

1 comment

ladyanita228 个月前
In the article, it says &quot;The Rust *struct* has a smaller size compared with the C due to the usage of smart pointers instead of allocating item memory inside the *struct*. We use *pahole* to identify that Rust *struct*s use fewer cache lines than their C counterpart.&quot;<p>As far as I know, you can also use pointers (not smart ones, that&#x27;s a C++ thing) inside structs in C, right? Like this:<p><pre><code> struct student { char *name; int age; char *program; char *subjects[5]; };</code></pre>