Article View: bnr.lang.c++
Article #5Re: Is pointer in my address space?
From: Eric Hildum
Date: Sat, 10 Oct 1992 03:41
Date: Sat, 10 Oct 1992 03:41
9 lines
1039 bytes
1039 bytes
In C/C++, you can check if a pointer is null before use, but not if it is pointing to valid memory. This kind of a check is really an operating system issue, not a language issue (at least, not in languages such as C and C++). You should look into the memory related system and library calls that are available to you, you may find what you need there. Of course, after determing whether or not the address is valid for the process, you still have the problem of deciding if your pointer is pointing to a valid object. Eric
Technical Details
Message-ID:
<1992Oct10.034147.6115@ntmtv>Path:
arc1-ca.pugleaf.net!sparky!uunet!portal!ntmtv!hildumReferences:
<ANDRZEJ.92Oct9135447@bcars268.bnr.ca> <1992Oct9.160154.2427@bnr.ca> <1992Oct9.190838.19205@bcrka451.bnr.ca>Show Full Headers
Complete Article Headers
Newsgroups: bnr.lang.c++,comp.lang.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!portal!ntmtv!hildum From: hildum@ntmtv.UUCP (Eric Hildum) Subject: Re: Is pointer in my address space? Message-ID: <1992Oct10.034147.6115@ntmtv> Sender: hildum@ntmtv (Eric Hildum) Nntp-Posting-Host: ariel Organization: Northern Telecom Inc, Mountain View, CA References: <ANDRZEJ.92Oct9135447@bcars268.bnr.ca> <1992Oct9.160154.2427@bnr.ca> <1992Oct9.190838.19205@bcrka451.bnr.ca> Date: Sat, 10 Oct 1992 03:41:47 GMT Lines: 9