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

Side by Side Diff: src/objects.h

Issue 8974010: Merge r10044 to 3.6 branch: Set maximum length of FixedArray in terms of elements instead an abso... (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: Created 9 years 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 | « no previous file | src/version.cc » ('j') | 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 2165
2166 // Code Generation support. 2166 // Code Generation support.
2167 static int OffsetOfElementAt(int index) { return SizeFor(index); } 2167 static int OffsetOfElementAt(int index) { return SizeFor(index); }
2168 2168
2169 // Casting. 2169 // Casting.
2170 static inline FixedArray* cast(Object* obj); 2170 static inline FixedArray* cast(Object* obj);
2171 2171
2172 // Maximal allowed size, in bytes, of a single FixedArray. 2172 // Maximal allowed size, in bytes, of a single FixedArray.
2173 // Prevents overflowing size computations, as well as extreme memory 2173 // Prevents overflowing size computations, as well as extreme memory
2174 // consumption. 2174 // consumption.
2175 static const int kMaxSize = 512 * MB; 2175 static const int kMaxSize = 128 * MB * kPointerSize;
2176 // Maximally allowed length of a FixedArray. 2176 // Maximally allowed length of a FixedArray.
2177 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; 2177 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize;
2178 2178
2179 // Dispatched behavior. 2179 // Dispatched behavior.
2180 #ifdef OBJECT_PRINT 2180 #ifdef OBJECT_PRINT
2181 inline void FixedArrayPrint() { 2181 inline void FixedArrayPrint() {
2182 FixedArrayPrint(stdout); 2182 FixedArrayPrint(stdout);
2183 } 2183 }
2184 void FixedArrayPrint(FILE* out); 2184 void FixedArrayPrint(FILE* out);
2185 #endif 2185 #endif
(...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
7486 } else { 7486 } else {
7487 value &= ~(1 << bit_position); 7487 value &= ~(1 << bit_position);
7488 } 7488 }
7489 return value; 7489 return value;
7490 } 7490 }
7491 }; 7491 };
7492 7492
7493 } } // namespace v8::internal 7493 } } // namespace v8::internal
7494 7494
7495 #endif // V8_OBJECTS_H_ 7495 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698