Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/heap.cc

Issue 16896012: Lower limit for external allocation and improve tracing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6602 matching lines...) Expand 10 before | Expand all | Expand 10 after
6613 // generation size. 6613 // generation size.
6614 if (max_executable_size_ > max_old_generation_size_) { 6614 if (max_executable_size_ > max_old_generation_size_) {
6615 max_executable_size_ = max_old_generation_size_; 6615 max_executable_size_ = max_old_generation_size_;
6616 } 6616 }
6617 6617
6618 // The new space size must be a power of two to support single-bit testing 6618 // The new space size must be a power of two to support single-bit testing
6619 // for containment. 6619 // for containment.
6620 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_); 6620 max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_);
6621 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_); 6621 reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_);
6622 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_); 6622 initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_);
6623 external_allocation_limit_ = 16 * max_semispace_size_; 6623
6624 // The external allocation limit should be below 256 MB on all architectures
6625 // to avoid unnecessary low memory notifications, as that is the threshold
6626 // for some embedders.
6627 external_allocation_limit_ = 12 * max_semispace_size_;
6628 ASSERT(external_allocation_limit_ <= 256 * MB);
6624 6629
6625 // The old generation is paged and needs at least one page for each space. 6630 // The old generation is paged and needs at least one page for each space.
6626 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; 6631 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
6627 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count * 6632 max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count *
6628 Page::kPageSize), 6633 Page::kPageSize),
6629 RoundUp(max_old_generation_size_, 6634 RoundUp(max_old_generation_size_,
6630 Page::kPageSize)); 6635 Page::kPageSize));
6631 6636
6632 configured_ = true; 6637 configured_ = true;
6633 return true; 6638 return true;
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
8070 if (FLAG_parallel_recompilation) { 8075 if (FLAG_parallel_recompilation) {
8071 heap_->relocation_mutex_->Lock(); 8076 heap_->relocation_mutex_->Lock();
8072 #ifdef DEBUG 8077 #ifdef DEBUG
8073 heap_->relocation_mutex_locked_by_optimizer_thread_ = 8078 heap_->relocation_mutex_locked_by_optimizer_thread_ =
8074 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 8079 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
8075 #endif // DEBUG 8080 #endif // DEBUG
8076 } 8081 }
8077 } 8082 }
8078 8083
8079 } } // namespace v8::internal 8084 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698