LGTM, thanks On Wed, Sep 17, 2008 at 12:27 PM, <[EMAIL PROTECTED]> wrote: > Reviewers: deanm, > > Description: > Move the initial code space to be before the young space instead of > after it. > The old arrangement meant that the alignment requirements of young space > were > likely to nullify ASLR. > > Please review this at http://codereview.chromium.org/2925 > > Affected files: > M src/heap.cc > > > Index: src/heap.cc > =================================================================== > --- src/heap.cc (revision 323) > +++ src/heap.cc (working copy) > @@ -2461,11 +2461,11 @@ > // code space. Align the pair of semispaces to their size, which must be > // a power of 2. > ASSERT(IsPowerOf2(young_generation_size_)); > - Address old_space_start = reinterpret_cast<Address>(chunk); > - Address new_space_start = RoundUp(old_space_start, > young_generation_size_); > - Address code_space_start = new_space_start + young_generation_size_; > - int old_space_size = new_space_start - old_space_start; > - int code_space_size = young_generation_size_ - old_space_size; > + Address code_space_start = reinterpret_cast<Address>(chunk); > + Address new_space_start = RoundUp(code_space_start, > young_generation_size_); > + Address old_space_start = new_space_start + young_generation_size_; > + int code_space_size = new_space_start - code_space_start; > + int old_space_size = young_generation_size_ - code_space_size; > > // Initialize new space. > new_space_ = new NewSpace(initial_semispace_size_, > > >
--~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---