TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby ladyanita228 months ago

1 comment

ladyanita228 months ago
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>