testing a pointer - VMS

This is a discussion on testing a pointer - VMS ; I vaguely remember a library call to test a pointer to see if the memory address is readable and/or writeable. I further recall that you might have passed in a page/pagelet or maybe even a range, rather than an actual ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: testing a pointer

  1. testing a pointer

    I vaguely remember a library call to test a pointer to see if the
    memory address is readable and/or writeable. I further recall that
    you might have passed in a page/pagelet or maybe even a range, rather
    than an actual memory address. I can't seem to find the routine. Am
    I imagining things, or does the routine exist?

    thanks

    joshua lehrer
    http://www.lehrerfamily.com/

  2. Re: testing a pointer

    On Sep 22, 5:32*pm, Joshua Lehrer wrote:
    > I vaguely remember a library call to test a pointer to see if the
    > memory address is readable and/or writeable. *I further recall that
    > you might have passed in a page/pagelet or maybe even a range, rather
    > than an actual memory address. *I can't seem to find the routine. *Am
    > I imagining things, or does the routine exist?
    >
    > thanks
    >
    > joshua lehrerhttp://www.lehrerfamily.com/



    There is PROBER and PROBEW available in MACRO32 and as C builtins
    http://h71000.www7.hp.com/commercial...ofile_032.html

  3. Re: testing a pointer

    In article <380c8bcf-b2c4-4b80-b3f1-74b96ce988d1@j22g2000hsf.googlegroups.com>, Joshua Lehrer writes:
    > I vaguely remember a library call to test a pointer to see if the
    > memory address is readable and/or writeable. I further recall that
    > you might have passed in a page/pagelet or maybe even a range, rather
    > than an actual memory address. I can't seem to find the routine. Am
    > I imagining things, or does the routine exist?


    The PROBEx instructions do this for VAXen, and on Alpha PAL_PROBEx.
    If you're programming in C there is a builtin for getting to these,
    that is probably somehow supported on I64.

    You can also access a lot of instructions via LIB$instruction named
    routines, but PROBEx aren't amoung them as most applications would
    not do this.

    You can also set up an exception handler and intentionally reference
    the locations.


  4. Re: testing a pointer

    In article , koehler@eisner.nospam.encompasserve.org (Bob Koehler) writes:
    >In article <380c8bcf-b2c4-4b80-b3f1-74b96ce988d1@j22g2000hsf.googlegroups.com>, Joshua Lehrer writes:
    >> I vaguely remember a library call to test a pointer to see if the
    >> memory address is readable and/or writeable. I further recall that
    >> you might have passed in a page/pagelet or maybe even a range, rather
    >> than an actual memory address. I can't seem to find the routine. Am
    >> I imagining things, or does the routine exist?

    >
    > The PROBEx instructions do this for VAXen, and on Alpha PAL_PROBEx.
    > If you're programming in C there is a builtin for getting to these,
    > that is probably somehow supported on I64.
    >
    > You can also access a lot of instructions via LIB$instruction named
    > routines, but PROBEx aren't amoung them as most applications would
    > not do this.
    >
    > You can also set up an exception handler and intentionally reference
    > the locations.


    Depending upon what you are doing, you can also establish EXE$SIGTORET as
    your procedure's condition handler and simply go reference whatever your
    pointer points to. If you can't access it, the ACCVIO will be translated
    to a return status (SS$_ACCVIO) by EXE$SIGTORET in your routine.

    --
    VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM

    .... pejorative statements of opinion are entitled to constitutional protection
    no matter how extreme, vituperous, or vigorously expressed they may be. (NJSC)

    Copr. 2008 Brian Schenkenberger. Publication of _this_ usenet article outside
    of usenet _must_ include its contents in its entirety including this copyright
    notice, disclaimer and quotations.

  5. Re: testing a pointer

    Hi Joshua,

    > Am
    > I imagining things, or does the routine exist?


    FWIW, I use the IFNORD/WRT macros rather than the PROBEx instructions
    directly.

    IIRC exe$probe[r] lets you check all pages in a range (not just first and
    last?) and specify a range of addresses/pages > 65535 bytes.
    (R3 = Previous Mode, R1 = Number of Bytes, R0 = base address)

    Cheers Richard Maher

    "Joshua Lehrer" wrote in message
    news:380c8bcf-b2c4-4b80-b3f1-74b96ce988d1@j22g2000hsf.googlegroups.com...
    > I vaguely remember a library call to test a pointer to see if the
    > memory address is readable and/or writeable. I further recall that
    > you might have passed in a page/pagelet or maybe even a range, rather
    > than an actual memory address. I can't seem to find the routine. Am
    > I imagining things, or does the routine exist?
    >
    > thanks
    >
    > joshua lehrer
    > http://www.lehrerfamily.com/




+ Reply to Thread