News for hackers. Stuff that matters.
Re:Almost Always Unsigned by kstenerud on Sunday January 02, 2022 @06:03AM (#29767729)
Indeed it does matter! As I said this is an example of an API that hasn't aged well (when they devised it, they probably didn't envision this happening).

There are a number of ways to handle this:

- Use unsigned 32-bit (gives you a little bit more runway, but you'll still hit the end hard)

- Use 64-bit values (ends your problem once and for all, but costs double the memory so now you have a new problem)

- Use 40-bit values (Gives you a lot more runway, but costs CPU)

There are no comments on this comment yet.