Re: virtual memory range that can be used for wrong pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Oleg:

> I have a code where i need more than one "wrong" pointer value(this one is
> NULL pointer). Something like a signal handler SIG_IGN that equal to 1.
>
> So, my question is, what is the guarantied range of addresses (from 0 to X),
> which can be safely used for this purpose on any hardware architecture?

On most architectures, -1L to -4095L is reserved for error numbers
returned by the mmap system call.  But mmap is a bit special in that
pointer must be page-aligned, so that this might not be of much help.




[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux