Determining if an address is valid prior to using it.

jimmie.davis@l-3com.com jimmie.davis@l-3com.com
Wed Jul 23 20:07:00 GMT 2008


Given an arbitrary address, is it possible to test and see if it is in
the process's address space ?

My current technique is to create a new thread, then access the memory
from that thread.  Then if it did not segfault i know the address was
valid.


Is there a better way to do this ?


thanks,
bud davis



"Buy the ticket, take the ride."
                   Hunter S. Thompson



More information about the Libc-help mailing list