|
From: Nicholas N. <nj...@ca...> - 2004-01-25 17:48:13
|
On Sat, 24 Jan 2004, Jeremy Fitzhardinge wrote: > All the dependencies on having to read /proc/self/maps before/after > allocating various pieces of memory should be obsolete now. This is > because 1) the client hasn't run at all at this early stage, so there > are no dynamically generated mappings, and 2) anyway, all client > mappings are in the client address space, and all Valgrind mappings are > above, so there's no likelihood of confusing the two. I don't know if > this actually makes any difference, but it seemed like a couple of > things were initialized in somewhat unnatural places because of this old > constraint. You're welcome to change it; I'm reluctant to do so because I'm not familiar enough with how memory is laid out at the start. > Also, I think read and parse of /proc/self/maps were separated because > it was quite common to read /proc/self/maps once, then parse it multiple > times for various reasons (in fact, main() does this now). I think this > is still a useful thing to have, though reading /proc/self/maps should > now only be necessary during startup, since after that the Segment list > will tell you everything you need to know about the layout of the > address space. /proc/self/maps is read once, and parsed twice, all within main() before running the client. Also, the two parsings happen one after another, in a way that made me think they could be combined. N |