Top all-time · #5214
Xavier Roche
Personal blog · blog.httrack.com/blogprogrammingsystems
Xavier Roche writes xavier roche's homework, a personal blog at blog.httrack.com about programming and systems. Since 2013, 15 different Hacker News readers have linked it 19 times, most often “Things to Know About Fsync (2013)”. The last post was in 2022, but the archive is still widely read.
Too few sampled comments (10) to say how often HN recommends it.?
Why HN links it
HN readers link this blog for posts on low-level systems topics: realloc and memory remapping, fsync and file durability, glibc strncat, and crash handling with signals and stack unwinding.
Summarised by Claude from a sample of 10 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Compiler-error-abuse-based large scale renaming in C++ ...
Most-linked posts?
- Things to Know About Fsync (2013)4 people · 4 mentions · first linked 2015-09-02
- A Story Of realloc (And Laziness)3 people · 3 mentions · first linked 2014-04-06
- Redirecting Stdio is Hard2 people · 2 mentions · first linked 2014-12-22
What Hacker News says?
And sometimes the crapware is bundled with legit free/open-source softwares :( (I ranted about that some time ago: http://blog.httrack.com/blog/2013/11/24/i-do-not-want-your-s... )
Comment linking /blog/2013/11/24/i-do-not-want-your-search-bar/
on “What Happens When You Install the Top Download.com Apps”Submitted What Are Your GCC Flags? as a story · 174 points
HN discussionfsync() has never been as reliable as the name implies, since flushing the disk cache kills performance system-wide. Fuzziness on what fsync does has... side effects: https://danluu.com/file-consistency/ http://blog.httrack.com/blog/2013/11/15/everything-you-alway... Filesystems optimized for flash, and for battery-backed systems in general, (laptops, phones) have some history: https://en.wikipedia.org/wiki/Flash_fi…
Comment linking /blog/2013/11/15/everything-you-always-wanted-to-know-about-fsync/
on “Why Google Pixel lags 10x more than Moto Z”Submitted A Story Of realloc (And Laziness) as a story · 130 points
HN discussionNo. Modern realloc are efficient, when moving large memory blocks, because they rely on the kernel ability to quickly relocate memory regions without involving memcpy() (through mremap() on Linux). Edit: shamelessly citing my blog entry on this subject: http://blog.httrack.com/blog/2014/04/05/a-story-of-realloc-a...
Comment linking /blog/2014/04/05/a-story-of-realloc-and-laziness/
on “Facebook's std::vector optimization”Submitted Redirecting Stdio is Hard as a story · 40 points
HN discussionThis argument in this article is mainly based on a naive realloc() that does allocate-copy-free, but on a system with virtual memory the memory allocator should be able to reallocate by modifying page table entries, which is far faster than copying the data around; in the (highly improbable) unfortunate case that there are no contiguous VAs on every reallocation, this method still has to move a quadratic number of P…
Comment linking /blog/2014/04/05/a-story-of-realloc-and-laziness
on “Please grow your buffers exponentially”Submitted Things to Know About Fsync (2013) as a story · 24 points
HN discussionThis only scratches the surface of the topic. Here's a fine article that talks about implementing a crash handler for JNI that goes into some of the more complex issues of multiple stacks, signal handling, stack unwinding, and calling across languages: http://blog.httrack.com/blog/2013/08/23/catching-posix-signa... Aside: it's interesting how complex things which I learned in my younger years have become. From under…
Comment linking /blog/2013/08/23/catching-posix-signals-on-android/
on “What is “the stack”?”Submitted Redirecting Stdio Is Hard as a story · 17 points
HN discussionFor large allocations, realloc can remap virtual memory instead of doing a naive copy: http://blog.httrack.com/blog/2014/04/05/a-story-of-realloc-a...
Comment linking /blog/2014/04/05/a-story-of-realloc-and-laziness/
on “Once upon a time, memory allocators made sense”Submitted Is my file properly sync’ed on disk? (2013) as a story · 11 points
HN discussionYup, I reported the same issue a year ago ( http://blog.httrack.com/blog/2014/08/31/i-found-a-bug-in-str... )
Comment linking /blog/2014/08/31/i-found-a-bug-in-strncat/
on “Integer overflow in glibc strncat”Submitted Standalone Visual C++ Compiler as a story · 3 points
HN discussionAlso useful: https://blog.httrack.com/blog/2013/11/15/everything-you-alwa...
Comment linking /blog/2013/11/15/everything-you-always-wanted-to-know-about-fsync/
on “Durability: Linux File APIs”Submitted Compiler-error-abuse-based large scale renaming in C++ as a story · 2 points
HN discussionUnwinding under Android, especially from JNI is also a mess. http://blog.httrack.com/blog/2013/08/23/catching-posix-signa...
Comment linking /blog/2013/08/23/catching-posix-signals-on-android/
on “On libunwind and dynamically generated code on x86-64”Submitted An Unusual Case of Case (/switch) as a story · 1 points
HN discussionBecause that is not portable and/or has performance problems. I'm not kidding you. I know the conventional wisdom is that a rename is enough. It is not. Depending on the filesystem, you may have to fsync() the directory entry too, or fsync the parent directory entry too. Or on other filesystems, don't do these because doing these may cause problems. And do all this in the right order, because if you get it slightly…
Comment linking /blog/2013/11/15/everything-you-always-wanted-to-know-about-fsync/
on “Mandatory File Locking for the Linux Operating System (2007)”