On Fri, 20 Sep 2002, Russ Lewis wrote:
> Is any of a userland application's virtual address space reserved?
> Certainly, some memory is used at startup: the code is loaded into some
> of the virtual space, as well as the stack. There needs to always be
> enough space for the stack to grow as necessary. But is any of the
> space actually marked off as "reserved"? If we just mmap'ed the same
> file over and over again, could we fill the 4Gb address space with
> identical mappings, or would we run out?
There are a number of issues here:
1) userspace has 3 GB space, kernel has the other 1 GB
2) if you want to mmap a file over and over again, you'll
need to have the code that maps the file and the glibc
mmap(3) stuff mapped into your address space ;)
3) your process will want to have a stack somewhere
4) address 0 is reserved to trap NULL pointer dereferences
both in kernel and user space
-- Bravely reimplemented by the knights who say "NIH".
Spamtraps of the month: firstname.lastname@example.org email@example.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:32 EST