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

Side by Side Diff: src/spaces.cc

Issue 3336019: [Isolates] Make isolate tests pass on x64 (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « src/spaces.h ('k') | src/spaces-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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 // We cannot free a chunk contained in the initial chunk because it was not 650 // We cannot free a chunk contained in the initial chunk because it was not
651 // allocated with AllocateRawMemory. Instead we uncommit the virtual 651 // allocated with AllocateRawMemory. Instead we uncommit the virtual
652 // memory. 652 // memory.
653 if (InInitialChunk(c.address())) { 653 if (InInitialChunk(c.address())) {
654 // TODO(1240712): VirtualMemory::Uncommit has a return value which 654 // TODO(1240712): VirtualMemory::Uncommit has a return value which
655 // is ignored here. 655 // is ignored here.
656 initial_chunk_->Uncommit(c.address(), c.size()); 656 initial_chunk_->Uncommit(c.address(), c.size());
657 COUNTERS->memory_allocated()->Decrement(static_cast<int>(c.size())); 657 COUNTERS->memory_allocated()->Decrement(static_cast<int>(c.size()));
658 } else { 658 } else {
659 LOG(DeleteEvent("PagedChunk", c.address())); 659 LOG(DeleteEvent("PagedChunk", c.address()));
660 ObjectSpace space = static_cast<ObjectSpace>(1 << c.owner()->identity()); 660 ObjectSpace space = static_cast<ObjectSpace>(1 << c.owner_identity());
661 size_t size = c.size(); 661 size_t size = c.size();
662 FreeRawMemory(c.address(), size, c.executable()); 662 FreeRawMemory(c.address(), size, c.executable());
663 PerformAllocationCallback(space, kAllocationActionFree, size); 663 PerformAllocationCallback(space, kAllocationActionFree, size);
664 } 664 }
665 c.init(NULL, 0, NULL); 665 c.init(NULL, 0, NULL);
666 Push(chunk_id); 666 Push(chunk_id);
667 } 667 }
668 668
669 669
670 Page* MemoryAllocator::FindFirstPageInSameChunk(Page* p) { 670 Page* MemoryAllocator::FindFirstPageInSameChunk(Page* p) {
(...skipping 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { 3043 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) {
3044 if (obj->IsCode()) { 3044 if (obj->IsCode()) {
3045 Code* code = Code::cast(obj); 3045 Code* code = Code::cast(obj);
3046 isolate->code_kind_statistics()[code->kind()] += code->Size(); 3046 isolate->code_kind_statistics()[code->kind()] += code->Size();
3047 } 3047 }
3048 } 3048 }
3049 } 3049 }
3050 #endif // DEBUG 3050 #endif // DEBUG
3051 3051
3052 } } // namespace v8::internal 3052 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.h ('k') | src/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698