Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 236 | 236 |
| 237 // Page size in bytes. This must be a multiple of the OS page size. | 237 // Page size in bytes. This must be a multiple of the OS page size. |
| 238 static const int kPageSize = 1 << kPageSizeBits; | 238 static const int kPageSize = 1 << kPageSizeBits; |
| 239 | 239 |
| 240 // Page size mask. | 240 // Page size mask. |
| 241 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; | 241 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; |
| 242 | 242 |
| 243 static const int kPageHeaderSize = kPointerSize + kPointerSize + kIntSize + | 243 static const int kPageHeaderSize = kPointerSize + kPointerSize + kIntSize + |
| 244 kIntSize + kPointerSize; | 244 kIntSize + kPointerSize; |
| 245 | 245 |
| 246 // The start offset of the object area in a page. | 246 // The start offset of the object area in a page. Aligned to both maps and |
| 247 static const int kObjectStartOffset = MAP_POINTER_ALIGN(kPageHeaderSize); | 247 // code alignment to be suitabel for both. |
|
Vitaly Repeshko
2010/09/24 15:45:38
Typo: "suitable".
| |
| 248 static const int kObjectStartOffset = | |
| 249 CODE_POINTER_ALIGN(MAP_POINTER_ALIGN(kPageHeaderSize)); | |
| 248 | 250 |
| 249 // Object area size in bytes. | 251 // Object area size in bytes. |
| 250 static const int kObjectAreaSize = kPageSize - kObjectStartOffset; | 252 static const int kObjectAreaSize = kPageSize - kObjectStartOffset; |
| 251 | 253 |
| 252 // Maximum object size that fits in a page. | 254 // Maximum object size that fits in a page. |
| 253 static const int kMaxHeapObjectSize = kObjectAreaSize; | 255 static const int kMaxHeapObjectSize = kObjectAreaSize; |
| 254 | 256 |
| 255 static const int kDirtyFlagOffset = 2 * kPointerSize; | 257 static const int kDirtyFlagOffset = 2 * kPointerSize; |
| 256 static const int kRegionSizeLog2 = 8; | 258 static const int kRegionSizeLog2 = 8; |
| 257 static const int kRegionSize = 1 << kRegionSizeLog2; | 259 static const int kRegionSize = 1 << kRegionSizeLog2; |
| (...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2250 | 2252 |
| 2251 private: | 2253 private: |
| 2252 LargeObjectChunk* current_; | 2254 LargeObjectChunk* current_; |
| 2253 HeapObjectCallback size_func_; | 2255 HeapObjectCallback size_func_; |
| 2254 }; | 2256 }; |
| 2255 | 2257 |
| 2256 | 2258 |
| 2257 } } // namespace v8::internal | 2259 } } // namespace v8::internal |
| 2258 | 2260 |
| 2259 #endif // V8_SPACES_H_ | 2261 #endif // V8_SPACES_H_ |
| OLD | NEW |