Subject: Re: Fixing Linux emulated brk()
To: Emmanuel Dreyfus <>
From: Christos Zoulas <>
List: tech-kern
Date: 03/15/2001 08:32:13
On Mar 15,  8:54am, (Emmanuel Dreyfus) wrote:
-- Subject: Re: Fixing Linux emulated brk()

| > As no other OS wants this, for now I would put it in p_emuldata.
| > If we find any other use, we can move it later. Don't change MI
| > code if there is no real need for it, and do the simplest change
| > to achieve your goal.
| Are we sure no other OS wants it? Getting a consistent break value
| between two brk() calls does not seems a very OS dependent requirement.

There is no issue of consistency here. On Linux you need to make 4 calls
to get the right value like jvm does. On NetBSD you only need one or 2.

| Does the standards require brk() to return the requested value and to
| set the actual break value beyond, on a page boundary? I wonder if it
| would not be better to store the process idea of break for any process,
| and return it when requested. (I may be telling nonsenses, I'm just
| asking)

You cannot map less than a page, so why would you want this value?

| If I use p_emuldata: this is a char*, how should I use it? Should I
| define a struct linux_emuldata and store a pointer on it there? 

Please read the code. There is already a struct linux_emuldata.