No, I'm not sure.
On further thinking the mapped_base would not be useful for you currently,
because at least in the SuSE/AMD64 kernel it only applies to 32bit processes.
The real solution is probably to pass in the search start hint in mmap's
address argument and not use MAP_32BiT.
e.g. use something like
/*
* Current gcc still needs PROT_EXEC because it doesn't call
* __enable_execute_stack for trampolines yet.
*/
stack = mmap(0x1000, stack_size, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
This will give you memory at the beginning of the address space and
beyond 4GB if needed.
This may still be slow, but fixing the search algorithm is a different
problem that can be tackled separately.
> Oh, and please rename MAP_32BIT to MAP_31BIT. This will save nerves on
> all sides.
I bet changing it will cost more nerves in supporting all these people
whose software doesn't compile anymore. And it's not really a lie. 2GB
is 32bit too.
-Andi
-
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/