Re: Find out the process address space

From: Måns Rullgård (mru_at_kth.se)
Date: 11/29/03

  • Next message: Måns Rullgård: "Re: Find out the process address space"
    Date: Sat, 29 Nov 2003 14:17:35 +0100
    
    

    singhal_maneesh@yahoo.com (For-NG) writes:

    > Is there a way to find out the process address space boundaries
    > (interms of addresses) programatically (in the user space only). Also
    > the start and end boundaries of different segments, if they can be
    > found out.

    No.

    > More precisely, I want to find out an authentic way by which I can
    > say a given address is invalid for this process (or for the current
    > process), and I get EFAULT kind of error if I use this address for
    > system calls like write,sigaction etc. Is there any existing library
    > routine exists which can do so. More wanted for Linux.

    Read the address. If you get a SIGSEGV, it wasn't valid. Relying on
    being able to determine the validity of an address is bad design.

    -- 
    Måns Rullgård
    mru@kth.se
    

  • Next message: Måns Rullgård: "Re: Find out the process address space"

    Relevant Pages

    • Re: Find out the process address space
      ... singhal_maneesh@yahoo.com (For-NG) writes: ... > the start and end boundaries of different segments, ... > say a given address is invalid for this process (or for the current ...
      (comp.unix.questions)
    • Re: Find out the process address space
      ... singhal_maneesh@yahoo.com (For-NG) writes: ... > the start and end boundaries of different segments, ... > say a given address is invalid for this process (or for the current ...
      (comp.unix.programmer)
    • Re: Find out the process address space
      ... > the start and end boundaries of different segments, ... > say a given address is invalid for this process (or for the current ... how you clean up after the signal and return to code is ...
      (comp.unix.questions)
    • Re: Find out the process address space
      ... > the start and end boundaries of different segments, ... > say a given address is invalid for this process (or for the current ... how you clean up after the signal and return to code is ...
      (comp.unix.programmer)
    • Re: Find out the process address space
      ... > the start and end boundaries of different segments, ... > say a given address is invalid for this process (or for the current ... how you clean up after the signal and return to code is ...
      (alt.os.linux)