Allocate/Free of Redis zskiplistNode that cannot be implemented in pure Zig with same memory layout and size

“Cannot” is a strong word, but it’s not as easy, no.

We had a nice Brainstorming thread about this a few months ago actually. In Zig, allocators do not keep track of how much memory they allocated, so you can’t simply give them a pointer and call it a day, you have to tell them how much memory you’re returning.

There are some strong tradeoffs here, I prefer what Zig does (for one thing, many a pwn starts with doing mischief to the length annotations of the heap), but just asking for more memory than fits in your struct and dishing it out is complicated and hard to get right.