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

Unified Diff: src/spaces-inl.h

Issue 325553002: --verify-predictable mode added for ensuring that GC behaves deterministically. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments Created 6 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 side-by-side diff with in-line comments
Download patch
« src/heap-inl.h ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
diff --git a/src/spaces-inl.h b/src/spaces-inl.h
index e863b519a99c0c06f93471d96428caa703dceb7a..7227f812fe652b466f526c78112b4067821ed46b 100644
--- a/src/spaces-inl.h
+++ b/src/spaces-inl.h
@@ -253,26 +253,19 @@ HeapObject* PagedSpace::AllocateLinearly(int size_in_bytes) {
// Raw allocation.
AllocationResult PagedSpace::AllocateRaw(int size_in_bytes) {
HeapObject* object = AllocateLinearly(size_in_bytes);
- if (object != NULL) {
- if (identity() == CODE_SPACE) {
- SkipList::Update(object->address(), size_in_bytes);
- }
- return object;
- }
- ASSERT(!heap()->linear_allocation() ||
+ ASSERT((object == NULL) ||
+ !heap()->linear_allocation() ||
Hannes Payer (out of office) 2014/06/18 09:45:10 I do not think the assert is correct. I think lin
Igor Sheludko 2014/06/18 12:38:49 It looks outdated so I removed both the ASSERT and
(anchor_.next_chunk() == &anchor_ &&
anchor_.prev_chunk() == &anchor_));
- object = free_list_.Allocate(size_in_bytes);
- if (object != NULL) {
- if (identity() == CODE_SPACE) {
- SkipList::Update(object->address(), size_in_bytes);
+ if (object == NULL) {
+ object = free_list_.Allocate(size_in_bytes);
+ if (object == NULL) {
+ object = SlowAllocateRaw(size_in_bytes);
}
- return object;
}
- object = SlowAllocateRaw(size_in_bytes);
if (object != NULL) {
if (identity() == CODE_SPACE) {
SkipList::Update(object->address(), size_in_bytes);
« src/heap-inl.h ('K') | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698