Messages in this thread | | | Date | Fri, 20 Sep 2002 19:11:15 -0300 (BRT) | From | Rik van Riel <> | Subject | Re: is any virtual address space reserved? |
| |
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
cheers,
Rik -- Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://distro.conectiva.com/
Spamtraps of the month: september@surriel.com trac@trac.org
- 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/
| |