What is Nostr?
Per Vognsen /
npub152t…v7uc
2023-09-13 13:02:15

Per Vognsen on Nostr: It's common to use fixed magic numbers for things like allocation headers/footers to ...

It's common to use fixed magic numbers for things like allocation headers/footers to detect write-clobbering corruption but you can actually do one better with incrementally updatable checksums at a very manageable cost. An intentional field write removes the checksum contribution corresponding to its old value before writing the new value and then it adds in the checksum contribution corresponding to the new value. There's an obvious concurrency issue here, so reason and apply accordingly.
Author Public Key
npub152ta9mm2x6nk4ffyrn7ycz444vf7x743t24yddyd40vvcwkw39wqv3v7uc