Tracy R Reed wrote:
Another important difference is that a C pointer is an actual memory location.

No, it's not. Maybe that's how your C compiler implements it, but that's not what C defines. I've used C interpreters where the pointers weren't actual memory locations.

You can add 10 to it and look at whatever is 10 bytes ahead in memory.

No, you can't. C doesn't guarantee that adding 10 to a pointer won't crash your program. Indeed, there are any number of architectures where this isn't so. (And I don't mean indirecting it. I mean at the actual addition.)

Is a Java reference an actual memory location? Can you find the size of a list of Java data structures, add something to the reference, and look ahead in memory? I'm pretty sure you can't.

No, you can't.

--
  Darren New / San Diego, CA, USA (PST)
    It's not feature creep if you put it
    at the end and adjust the release date.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to