| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 } | 775 } |
| 776 | 776 |
| 777 // --------------------------------------------------------------------- | 777 // --------------------------------------------------------------------- |
| 778 | 778 |
| 779 // Page size in bytes. This must be a multiple of the OS page size. | 779 // Page size in bytes. This must be a multiple of the OS page size. |
| 780 static const int kPageSize = 1 << kPageSizeBits; | 780 static const int kPageSize = 1 << kPageSizeBits; |
| 781 | 781 |
| 782 // Object area size in bytes. | 782 // Object area size in bytes. |
| 783 static const int kNonCodeObjectAreaSize = kPageSize - kObjectStartOffset; | 783 static const int kNonCodeObjectAreaSize = kPageSize - kObjectStartOffset; |
| 784 | 784 |
| 785 // Maximum object size that fits in a page. Objects larger than that size are |
| 786 // allocated in large object space and are never moved in memory. This also |
| 787 // applies to new space allocation, since objects are never migrated from new |
| 788 // space to large object space. Takes double alignment into account. |
| 789 static const int kMaxRegularHeapObjectSize = kPageSize - kObjectStartOffset; |
| 790 |
| 785 // Maximum object size that fits in a page. Objects larger than that size | 791 // Maximum object size that fits in a page. Objects larger than that size |
| 786 // are allocated in large object space and are never moved in memory. This | 792 // are allocated in large object space and are never moved in memory. This |
| 787 // also applies to new space allocation, since objects are never migrated | 793 // also applies to new space allocation, since objects are never migrated |
| 788 // from new space to large object space. Takes double alignment into account. | 794 // from new space to large object space. Takes double alignment into account. |
| 789 static const int kMaxNonCodeHeapObjectSize = | 795 static const int kMaxNonCodeHeapObjectSize = |
| 790 kNonCodeObjectAreaSize - kPointerSize; | 796 kNonCodeObjectAreaSize - kPointerSize; |
| 791 | 797 |
| 792 // Page size mask. | 798 // Page size mask. |
| 793 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; | 799 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; |
| 794 | 800 |
| (...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2923 } | 2929 } |
| 2924 // Must be small, since an iteration is used for lookup. | 2930 // Must be small, since an iteration is used for lookup. |
| 2925 static const int kMaxComments = 64; | 2931 static const int kMaxComments = 64; |
| 2926 }; | 2932 }; |
| 2927 #endif | 2933 #endif |
| 2928 | 2934 |
| 2929 | 2935 |
| 2930 } } // namespace v8::internal | 2936 } } // namespace v8::internal |
| 2931 | 2937 |
| 2932 #endif // V8_SPACES_H_ | 2938 #endif // V8_SPACES_H_ |
| OLD | NEW |