On Fri, Jun 25, 2010 at 4:44 PM, Matt Seegmiller <[email protected]> wrote:

> So my question is, why isn't kHandleZapValue (and kZapValue and
> kFromSpaceZapValue for that matter) an even value that can't possibly
> be a HeapObject pointer?  And does it seem possible that there would
> be a valid allocation at the address 0x0baddead?
>
>
An even more reliable option, IMO, though possibly not as performant, is to
use the address of a static stack-allocated object, e.g.:

// private:
static const int zapper = 1;
// public:
const void * kHandleZapValue = &zapper;

granted, the address may be different between runs, but it's guaranteed to
never be either dynamically nor statically allocated for any other purpose.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to