FFI Report, CVS Id 1.11

Carl R. Witty cwitty at newtonlabs.com
Thu Aug 23 19:38:21 EDT 2001

"Manuel M. T. Chakravarty" <chak at cse.unsw.edu.au> writes:

> Array and list indicies are quite different beats from
> pointer differences.  To get into a problem with array
> indicies, we would need an array (and thus, heap) that is
> big enough to requires such an index.  In contrast, pointers
> are not constrained be point into the heap.  For, example
> with mmap(), I can easily get two pointers that are much
> further apart than what would fit into the real (even the
> virtual) memory of the concrete hardware.  In other words,
> in x86 Linux, your address space is already 3GB.  We don't
> need any new fancy hardware for 30 bit pointer differences
> to have the potential to get us into trouble.

Why would you want to take the difference of two pointers that point
into different objects?

Carl Witty

More information about the FFI mailing list