PtrIsErr¶
Tells whether a pointer returned by MemMap() or MemMapAnon() is an error.
Library helper
Implemented in zuzu.h on top of the syscalls; it has no syscall number of its own.
int PtrIsErr(const void *p);
Those calls return either an address or a negative Err cast to a pointer; the error range is the top 4095 bytes of the address space.
Parameters¶
| Name | Direction | Description |
|---|---|---|
p |
in | Pointer to test. |
Returns¶
Non-zero if p encodes an error; recover it with (Err)(intptr_t)p.