When the Linux kernel removes an entry from a linked list using list_del(), it doesn't set its next and prev pointers to NULL.
On typical 64-bit systems, it sets them to 0xdead000000000100 and 0xdead000000000122 (LIST_POISON1 and LIST_POISON2).
these deliberately invalid addresses help catch code that accidentally accesses a removed list entry. Instead of silently following a stale pointer, the kernel can fault at a recognizable poison address.
It's called pointer poisoning.
@JustDeezGuy C macros are unhygienic and a bit dirty, like Common Lisp's. But they are also dumb, and can't use the whole language, unlike in lisp.
So they are like a toddler, cute but not that powerful.
@SebAaltonen@YashHustle_22 For me, assembly is fun to read, write and debug. I don't know why people don't use it for their low-stakes hobby projects more.
The only point of a bss section is it takes no space in the executable because its not initialized.
So if your program only has smallish buffers, you might as well put them in a data section.
@fjs_kyousosama@shigerufujita and only works if the business' margins are high enough to pay for it, with high and predictable future ROI. Or if it's subsidized (eg. med students working at hospitals).
@_rygo6 I am of the (unverified) opinion that reducing pointers in structs + not using malloc inside computations + using big fat arrays would also lead to less buggy code. is that your experience?