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

Side by Side Diff: src/spaces.h

Issue 20867003: More cleanup regarding the maximum non-large object allocation size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
« no previous file with comments | « src/objects-visiting.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 Address OffsetToAddress(int offset) { 771 Address OffsetToAddress(int offset) {
772 ASSERT_PAGE_OFFSET(offset); 772 ASSERT_PAGE_OFFSET(offset);
773 return address() + offset; 773 return address() + offset;
774 } 774 }
775 775
776 // --------------------------------------------------------------------- 776 // ---------------------------------------------------------------------
777 777
778 // Page size in bytes. This must be a multiple of the OS page size. 778 // Page size in bytes. This must be a multiple of the OS page size.
779 static const int kPageSize = 1 << kPageSizeBits; 779 static const int kPageSize = 1 << kPageSizeBits;
780 780
781 // Object area size in bytes. 781 // Object area size in bytes. Take double alignment into account.
782 static const int kNonCodeObjectAreaSize = kPageSize - kObjectStartOffset; 782 static const int kNonCodeObjectAreaSize =
783 kPageSize - kObjectStartOffset - kPointerSize;
Michael Starzinger 2013/08/02 12:30:53 I don't think the wiggle room for double alignment
Hannes Payer (out of office) 2013/08/05 12:52:21 Done.
783 784
784 // Maximum object size that fits in a page. Objects larger than that size 785 // Maximum object size that fits in a page. Objects larger than that size
785 // are allocated in large object space and are never moved in memory. This 786 // are allocated in large object space and are never moved in memory. This
786 // also applies to new space allocation, since objects are never migrated 787 // also applies to new space allocation, since objects are never migrated
787 // from new space to large object space. 788 // from new space to large object space.
788 static const int kMaxNonCodeHeapObjectSize = kNonCodeObjectAreaSize; 789 static const int kMaxNonCodeHeapObjectSize = kNonCodeObjectAreaSize;
789 790
790 // Page size mask. 791 // Page size mask.
791 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1; 792 static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1;
792 793
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 } 2878 }
2878 // Must be small, since an iteration is used for lookup. 2879 // Must be small, since an iteration is used for lookup.
2879 static const int kMaxComments = 64; 2880 static const int kMaxComments = 64;
2880 }; 2881 };
2881 #endif 2882 #endif
2882 2883
2883 2884
2884 } } // namespace v8::internal 2885 } } // namespace v8::internal
2885 2886
2886 #endif // V8_SPACES_H_ 2887 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/objects-visiting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698