Tag
A blog post doing 'Unix archaeology' on how early Unix versions (V4, 1973) handled memory allocation, from a primitive linear allocator using sbrk() to Dennis Ritchie's malloc()/mfree() map-based precursor in /usr/sys/dmr/malloc.c.
A YouTube video demonstrating how to build all Linux file utilities from scratch in C by hand in 52 minutes, without using AI assistance. Shared via Lobsters with discussion from the developer community.
作者从 Go 和 Zig 回到 C 编程时,反思了错误处理和资源清理的痛点,并介绍了受 John Carmack 邮件启发的使用 goto 统一清理出口的写法,让 C 的错误处理更简洁。
The author explains the common mistakes when iterating backwards in C and presents the clean idiom `for(size_t i = count; i--; )`, which avoids signed-index and wrap-around pitfalls, especially as LLM-generated code repeats the buggy versions.
一篇 TIL 博客指出 POSIX 的 wordexp(3) 默认启用命令替换,即使传入 WRDE_NOCMD,musl 和 macOS 的 libc 实现也可能被绕过,建议不要在不可信输入上使用它。
A 2014 blog post by L. Pereira exploring increasingly optimized ways to convert integers to strings in C, comparing naive division-based approaches, an in-place reverse-free variant used in Lwan, and Facebook's pair-of-digits lookup table trick that roughly halves the number of divisions for a ~31% speedup.
作者分享了在 C23 标准下采用的三种现代 C 编码约定,包括使用 [[nodiscard]] 与 [[maybe_unused]] 处理未使用返回值、C23 中 union 初始化行为的变化,以及借助 auto 简化代码的新模式。
A blog post explaining the problems of NUL-terminated strings in C and introducing a small single-file C library that provides str_view and str_owned structs for safer, more efficient string handling.
博主更正了此前关于 glibc 中 initstate() 不遵循 POSIX 错误返回规范的说法:该 bug 早在 2013 年就已修复,只是 initstate(3) man page 至今未更新,且页面还遗漏了 POSIX 实际上并未为该函数定义任何错误条件这一关键信息。
一篇讲解 C 语言中 Arena 分配器的技术指南,介绍如何通过批量分配内存块来替代传统的 malloc/free 模式,从而提升性能并减少内存泄漏。
技术博客文章探讨了在C代码中对秘密数据进行零化(memset/secure_zero)的常见做法为何可能适得其反:编译器优化会删除memset,而volatile字节写入或不透明的wipe函数反而可能引入新的秘密副本并让其残留在寄存器中。
A technical blog post exploring techniques for writing type-safe generic data structures in C, progressing from header-inclusion macros and void pointers to unions and inline storage, illustrated with a linked list implementation.
This blog post details the author's process of creating a NES demake fangame of Deltarune Chapter 3, covering technical aspects like NES development tools and workflow.
A professor at Illinois initiated a collaborative Wikibook with students to provide a free, comprehensive guide covering systems programming topics such as C, processes, threads, and security.
LinearSolveBench is a new benchmark for evaluating linear solvers in C, focusing on speed, accuracy, and generality for large sparse systems to promote algorithmic advances.
Npunlock is a tool that enables running custom C kernels on Intel NPUs by reconstructing the path from C code to runnable kernels, with verification on Meteor Lake hardware.
This article explains type punning in C and C++, warning about the undefined behavior of pointer casts due to strict aliasing rules and recommending unions or memcpy for safe type punning.
A free book titled 'Computing Systems Organization' by Dr. Carl Burch is released under CC License, comprising 16 documents on modern computing system concepts.
SDCC is a Small Device C Compiler, a development tool for programming small and embedded systems in the C language.
This paper introduces C*, a proof-integrated language that unifies C programming with formal verification, enabling real-time verification through embedded proof-code blocks.