detecting invalid pointers

Henry Spencer henry at utzoo.uucp
Thu Mar 16 02:45:54 AEST 1989


In article <24230 at watmath.waterloo.edu> rbutterworth at watmath.waterloo.edu (Ray Butterworth) writes:
>...There is a common case where the pointers are perfectly valid
>and yet you still need to check to see if one points inside the
>other even though they might actually point to completely different
>objects.
>Consider implementing memmov(void *to, void *from, size_t bytes).
>...
>As has been discussed in recent postings, there isn't any obvious
>simple way of performing these tests required by the pANS C library.

Nobody has ever pretended that it is possible to implement ANSI C in a
totally machine-independent way; there has to be hardware-specific code
down there somewhere.  The insides of things like memmove are likely
to be heavily machine-dependent in any case.
-- 
Welcome to Mars!  Your         |     Henry Spencer at U of Toronto Zoology
passport and visa, comrade?    | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list