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

Side by Side Diff: src/heap/spaces.h

Issue 581223004: Support large objects in the serializer/deserializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 6 years, 2 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 static intptr_t ObjectSizeFor(intptr_t chunk_size) { 2721 static intptr_t ObjectSizeFor(intptr_t chunk_size) {
2722 if (chunk_size <= (Page::kPageSize + Page::kObjectStartOffset)) return 0; 2722 if (chunk_size <= (Page::kPageSize + Page::kObjectStartOffset)) return 0;
2723 return chunk_size - Page::kPageSize - Page::kObjectStartOffset; 2723 return chunk_size - Page::kPageSize - Page::kObjectStartOffset;
2724 } 2724 }
2725 2725
2726 // Shared implementation of AllocateRaw, AllocateRawCode and 2726 // Shared implementation of AllocateRaw, AllocateRawCode and
2727 // AllocateRawFixedArray. 2727 // AllocateRawFixedArray.
2728 MUST_USE_RESULT AllocationResult 2728 MUST_USE_RESULT AllocationResult
2729 AllocateRaw(int object_size, Executability executable); 2729 AllocateRaw(int object_size, Executability executable);
2730 2730
2731 void PrepareForDeserialization(int large_objects_total_size);
Hannes Payer (out of office) 2014/09/24 21:27:51 Please delete this method.
2732
2733 bool CanAllocateSize(int size) { return Size() + size <= max_capacity_; }
2734
2731 // Available bytes for objects in this space. 2735 // Available bytes for objects in this space.
2732 inline intptr_t Available(); 2736 inline intptr_t Available();
2733 2737
2734 virtual intptr_t Size() { return size_; } 2738 virtual intptr_t Size() { return size_; }
2735 2739
2736 virtual intptr_t SizeOfObjects() { return objects_size_; } 2740 virtual intptr_t SizeOfObjects() { return objects_size_; }
2737 2741
2738 intptr_t MaximumCommittedMemory() { return maximum_committed_; } 2742 intptr_t MaximumCommittedMemory() { return maximum_committed_; }
2739 2743
2740 intptr_t CommittedMemory() { return Size(); } 2744 intptr_t CommittedMemory() { return Size(); }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 count = 0; 2881 count = 0;
2878 } 2882 }
2879 // Must be small, since an iteration is used for lookup. 2883 // Must be small, since an iteration is used for lookup.
2880 static const int kMaxComments = 64; 2884 static const int kMaxComments = 64;
2881 }; 2885 };
2882 #endif 2886 #endif
2883 } 2887 }
2884 } // namespace v8::internal 2888 } // namespace v8::internal
2885 2889
2886 #endif // V8_HEAP_SPACES_H_ 2890 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | src/heap/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698