Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: detecting invalid pointers Message-ID: <1989Mar15.164554.21337@utzoo.uucp> Organization: U of Toronto Zoology References: <15495@cup.portal.com> <11998@haddock.ima.isc.com> <767@twwells.uucp> <24230@watmath.waterloo.edu> Date: Wed, 15 Mar 89 16:45:54 GMT In article <24230@watmath.waterloo.edu> rbutterworth@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@zoo.toronto.edu