Hacker News new | past | comments | ask | show | jobs | submit login

You don't store direct memory offsets if possible. You have a system of handles and store the handle keys instead ofndirect pointer addresses.

Yes you still need to validate the keys to avoid logic errors, but you can avoid the memory errors.




In this case, the direct memory addresses are literally needed.

The addresses aren't being generated internal to the program, so there are no "handles". They are referencing external data by design.

That's like saying "you shouldn't use a hard-coded volatile pointer to reference a hardware device". No, you literally need to do that sometimes; especially in embedded software.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: