Messages in this thread | | | From | Michael Driscoll <> | Subject | Re: [OT] Testing PROT_NONE and other protections, and a surprise | Date | Thu, 1 Jul 2004 11:26:11 -0600 |
| |
On Thursday 01 July 2004 08:43, Kyle Moffett wrote: > On Jul 01, 2004, at 08:39, Jamie Lokier wrote: > > The error code is -1, aka. MAP_FAILED. > > Oops! I guess I was just lucky that part didn't fail :-D On the other > hand, it couldn't legally return 0 anyway, could it? That would have been a > slightly more sensible error code, IMHO, anyway, but it probably came from > some silly standard somewhere.
mmap can (and will, in the case of glibc) return NULL for a length of 0.
-- Michael Driscoll, fenris@ulfheim.net "A noble spirit embiggens the smallest man" -- J. Springfield - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |