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

Re: Somw questions [ MAYBE OFFTOPIC ]



> A NULL pointer is just yet another invalid address.  There is no special
> test for a NULL pointer.  Most probably for example (char *)0x12345678 will
> be invalid as a pointer as well and treated the same.  The CPU detects this
> when the TLB doesn't have a translation valid for the access being attempted.

Which is why you can do -=*fun*=- things such as:

fd = open("/dev/kmem", O_RDWR);
mmap(0,64000,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_FIXED,fd,0xB8000);

:)   ^                                       ^^^^^^^^^

- Chris
-----------------------------------------------------------------------------
Chris Atenasio <chrisa@ultranet.com> - Friends don't let friends use Windows.
Send mail with subject "send pgp key" or "word of the day" for auto-response.
Today's word of the day: masculinity

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/