Messages in this thread | | | Date | Thu, 13 Dec 2001 17:10:16 +0000 (GMT) | From | Hugh Dickins <> | Subject | Re: Repost: could ia32 mmap() allocations grow downward? |
| |
On Thu, 13 Dec 2001, Wayne Whitney wrote: > So it seems like for MAGMA I should be able to work around the fact that > mmap()'s start at 0x40000000. But as difficulties with other programs > come up here fairly regularly, I still think it makes sense to fully > understand the downside of modifying the kernel to allocate mmap() VMAs > going downward. If the downside is small, I think it is a good tradeoff.
My fear is that you may encounter an indefinite number of buggy apps, which expect an mmap() to follow the mmap() before: easy bug to commit, and to go unnoticed, until you reverse the layout.
As to where to place your stack: I don't know what assumptions are made elsewhere, but a seemingly good place is just below the program's text at 0x08048000. People sometimes ask why i386 ELF text is usually placed there: I think it's a convention of some other UNIX implementations, which used to put stack below text and data above it, all sharing the one page table (if it's a smallish process).
Hugh
- 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/
| |