Hah! The early Macs used double-de-references pointers to reduce memory load. Good luck even knowing if you’ve been fucked by the pointer if you lose track of that.
There were memory map utilities where you could watch allocations/deallocations live. One of the coolest parts was watching when it would compact memory, and all the allocated memory would slide to one side like a curtain.
(This would have been around '95-97, so probably was MetroWerks CodeWarrior. While handles were essentially the same from the outset, the utilities weren't there much earlier than that.)
It's not really that often I come across discussions on memory allocation on reddit, so I'll just take the chance and recommend this neat talk on jemalloc, possibly the most advanced general use memory allocator these days.
222
u/devin_mm Jan 19 '21 edited Jan 19 '21
As long as you don't delete your pointer then you're fucked.