| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 238 |
| 239 // Page size in bytes. This must be a multiple of the OS page size. | 239 // Page size in bytes. This must be a multiple of the OS page size. |
| 240 static const int kPageSize = 1 << kPageSizeBits; | 240 static const int kPageSize = 1 << kPageSizeBits; |
| 241 | 241 |
| 242 // Page size mask. | 242 // Page size mask. |
| 243 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; | 243 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; |
| 244 | 244 |
| 245 static const int kPageHeaderSize = kPointerSize + kPointerSize + kIntSize + | 245 static const int kPageHeaderSize = kPointerSize + kPointerSize + kIntSize + |
| 246 kIntSize + kPointerSize + kPointerSize; | 246 kIntSize + kPointerSize + kPointerSize; |
| 247 | 247 |
| 248 // The start offset of the object area in a page. | 248 // The start offset of the object area in a page. Aligned to both maps and |
| 249 static const int kObjectStartOffset = MAP_POINTER_ALIGN(kPageHeaderSize); | 249 // code alignment to be suitabel for both. |
| 250 static const int kObjectStartOffset = |
| 251 CODE_POINTER_ALIGN(MAP_POINTER_ALIGN(kPageHeaderSize)); |
| 252 |
| 250 | 253 |
| 251 // Object area size in bytes. | 254 // Object area size in bytes. |
| 252 static const int kObjectAreaSize = kPageSize - kObjectStartOffset; | 255 static const int kObjectAreaSize = kPageSize - kObjectStartOffset; |
| 253 | 256 |
| 254 // Maximum object size that fits in a page. | 257 // Maximum object size that fits in a page. |
| 255 static const int kMaxHeapObjectSize = kObjectAreaSize; | 258 static const int kMaxHeapObjectSize = kObjectAreaSize; |
| 256 | 259 |
| 257 static const int kDirtyFlagOffset = 2 * kPointerSize; | 260 static const int kDirtyFlagOffset = 2 * kPointerSize; |
| 258 static const int kRegionSizeLog2 = 8; | 261 static const int kRegionSizeLog2 = 8; |
| 259 static const int kRegionSize = 1 << kRegionSizeLog2; | 262 static const int kRegionSize = 1 << kRegionSizeLog2; |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2296 } | 2299 } |
| 2297 // Must be small, since an iteration is used for lookup. | 2300 // Must be small, since an iteration is used for lookup. |
| 2298 static const int kMaxComments = 64; | 2301 static const int kMaxComments = 64; |
| 2299 }; | 2302 }; |
| 2300 #endif | 2303 #endif |
| 2301 | 2304 |
| 2302 | 2305 |
| 2303 } } // namespace v8::internal | 2306 } } // namespace v8::internal |
| 2304 | 2307 |
| 2305 #endif // V8_SPACES_H_ | 2308 #endif // V8_SPACES_H_ |
| OLD | NEW |