Find the answer to your Linux question:
Results 1 to 2 of 2
I wanted to know if there is a system call that will determine if a process will cause a segmentation fault when trying to read/write to a particular memory address....
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    33

    Memory Reading/Writing causes seg fault

    I wanted to know if there is a system call that will determine if a process will cause a segmentation fault when trying to read/write to a particular memory address.

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Quoth sean04:
    I wanted to know if there is a system call that will determine if a process will cause a segmentation fault when trying to read/write to a particular memory address.
    I seriously doubt it, because it's rare, if ever, that a system call exists to do something you can do yourself in userland.

    And you can find out without a special system call whether a given address is in your address space.

    Do this at the command line:
    Code:
    man proc
    and search for maps, and all will be revealed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...