I was reading about integer overflow on wikipedia , and came across the term Pointer Swizzling in the see also collumn.
I googled about pointer swizzling , but couldn't understand it.
Can anyone please explain what is pointer swizzling?
The wikipedia page explains this, but let me say it another way.
Say you have a binary tree data structure in memory and want to save the structure to disk. You can not simply write the structure to disk because the pointers will be invalid on disk. Also when you later want to read the binary tree from disk back into memory, the addresses used in the original memory copy of the tree might already be in use in the new process.
Pointer swizzling is converting pointers to handles when writing from memory to disk, and also converting handles to (different) pointers when reading the disk data back into memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With