I don't even hit 256 on my desktop with a shitton of things open and 75 firefox sandbox processes, much less on a remote server. What in heaven's name are you doing to cross 256?
> C code which might be compiled by a C++ compiler.
I really hope you're talking mostly about header files; for actual code this is such a horrible idea (and in a lot of cases just won't work without massive efforts.) Even for header files, arguably one ought to really know what they're doing.
For sure, a union which is used as API surface to a C library which a C++ codebase uses is the most obvious and dangerous footgun here.
The article never even discusses how C++ actually implements unions to begin with, so it's just incomplete. (Only the "active" member is meaningful, the others are considered as meaningless and shouldn't be touched.)
The example included below "Why C and C++ Differ" is UB in both C and C++ (and says nothing about "why" C & C++ differ). The article isn't overall wrong but that bit is just...
(Feels a bit like LLM junk, but honestly not sure.)
Because if the comment is correct, it's useful signal for other potential readers to know that they can skip it.
I try to be as charitable as possible when reading and commenting online, but we don't have infinite attention and thanks to AI, it's easier than ever to end up wasting it on things that aren't worth reading.
(I'm not claiming that the article here is or is not an example of that.)
Fun story, but libraries occasionally get rid of things without removing all their labels. It's very possible it was discarded by the library rather than lent & overdue.
The tables look mostly correct, and that's what I'll be bookmarking this for… I don't think I've seen any elsewhere that are this extensive (in both axis, total allocators covered & details per allocator).
(Also this isn't a default limit.)
reply