Tag Info

New answers tagged

6

There's a key difference between managing memory as a resource (when you don't care what's inside and shouldn't even look), and using memory to do something else (when the contents are the whole point). ... memory administration is often better accomplished ... The quote is talking about managing memory addressing and maps, where you're treating memory ...


4

A typical use case (in hosted user-code applications) to cast some pointer to an intptr_t (from <stdint.h> standard C99 or C11 header) is to compute some hash code on that pointer: uint32_t hash_of_foo_ptr(struct foo_st*foo) { return (uint32_t) (((intptr_t)foo)*613) ^ ((intptr)foo%51043)); } For historical reasons (e.g. Linux came before C99), ...



Top 50 recent answers are included