OLD | NEW |
---|---|
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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1097 static int CodePageGuardSize(); | 1097 static int CodePageGuardSize(); |
1098 | 1098 |
1099 static int CodePageAreaStartOffset(); | 1099 static int CodePageAreaStartOffset(); |
1100 | 1100 |
1101 static int CodePageAreaEndOffset(); | 1101 static int CodePageAreaEndOffset(); |
1102 | 1102 |
1103 static int CodePageAreaSize() { | 1103 static int CodePageAreaSize() { |
1104 return CodePageAreaEndOffset() - CodePageAreaStartOffset(); | 1104 return CodePageAreaEndOffset() - CodePageAreaStartOffset(); |
1105 } | 1105 } |
1106 | 1106 |
1107 static int PageAreaSize(AllocationSpace space) { | |
mvstanton
2014/10/31 11:20:28
How about a DCHECK that space isn't LO_SPACE.
| |
1108 return (space == CODE_SPACE) ? CodePageAreaSize() | |
1109 : Page::kMaxRegularHeapObjectSize; | |
1110 } | |
1111 | |
1107 MUST_USE_RESULT bool CommitExecutableMemory(base::VirtualMemory* vm, | 1112 MUST_USE_RESULT bool CommitExecutableMemory(base::VirtualMemory* vm, |
1108 Address start, size_t commit_size, | 1113 Address start, size_t commit_size, |
1109 size_t reserved_size); | 1114 size_t reserved_size); |
1110 | 1115 |
1111 private: | 1116 private: |
1112 Isolate* isolate_; | 1117 Isolate* isolate_; |
1113 | 1118 |
1114 // Maximum space size in bytes. | 1119 // Maximum space size in bytes. |
1115 size_t capacity_; | 1120 size_t capacity_; |
1116 // Maximum subset of capacity_ that can be executable | 1121 // Maximum subset of capacity_ that can be executable |
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2894 count = 0; | 2899 count = 0; |
2895 } | 2900 } |
2896 // Must be small, since an iteration is used for lookup. | 2901 // Must be small, since an iteration is used for lookup. |
2897 static const int kMaxComments = 64; | 2902 static const int kMaxComments = 64; |
2898 }; | 2903 }; |
2899 #endif | 2904 #endif |
2900 } | 2905 } |
2901 } // namespace v8::internal | 2906 } // namespace v8::internal |
2902 | 2907 |
2903 #endif // V8_HEAP_SPACES_H_ | 2908 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |