4 ms·
Thou shalt not follow the NULL pointer should probably be appended with and thou shalt not map the zero page.
by CalChris 6y ago
Thou shalt not follow the NULL pointer should probably be appended with and thou shalt not map the zero page.
- beefhash 6y agoKind of hard when the operating system does it for you... https://groups.google.com/d/msg/comp.unix.aix/0dv4N0qmgVQ/tyhnSiOLD0cJ https://groups.google.com/d/msg/comp.unix.aix/0dv4N0qmgVQ/ty...
- CalChris 6y agoOSX (well, OSX ld, not OSX itself) actually does this for you and unmaps the entire low 4GB for good measure, giving new meaning to 32-bit clean.
- beached_whale 6y agoNULL is not the zero page... well at least in the C machine. NULL is NULL. But then again, it does work on systems where it matters(e.g. address 0 is valid and needed)
- greenyoda 6y agoSometimes, the zero page is available to your C program. For example, your C code could be part of the Linux kernel's boot code, or could be running on embedded hardware.