[haiku-development] Re: Fixed main thread user stack address

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 23 Feb 2013 07:47:30 +1300

Pawel Dziepak <pdziepak@xxxxxxxxxxx> wrote:
>In other words, would it
>break anything making the stack position non-deterministic?

No.

>Also, is anyone aware of any other possible compatibility problems
>that may arise when things in process address space get shuffled a
>bit?

As you probably already have noticed, the address space is organized in a way 
that heap and stacks grow towards each other, so that we get most out of the 
address space regardless the use case (many threads or many/large heap 
allocations) and avoid fragmentation (due to stacks normally being equally 
sized). This is something you should keep in mind or the properties will be 
lost.

Other than that the commpage is at a fixed address and randomizing it may not 
be trivial. There's also the team user data area. It should be easy to move, 
but it need some pages of room so it can grow, if many threads are created.

CU, Ingo

Other related posts: