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

Side by Side Diff: src/heap.h

Issue 136001: Changed allocation to allow large objects to be allocated in new space.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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 | « no previous file | src/heap.cc » ('j') | src/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 // Returns the capacity of the heap in bytes w/o growing. Heap grows when 236 // Returns the capacity of the heap in bytes w/o growing. Heap grows when
237 // more spaces are needed until it reaches the limit. 237 // more spaces are needed until it reaches the limit.
238 static int Capacity(); 238 static int Capacity();
239 239
240 // Returns the available bytes in space w/o growing. 240 // Returns the available bytes in space w/o growing.
241 // Heap doesn't guarantee that it can allocate an object that requires 241 // Heap doesn't guarantee that it can allocate an object that requires
242 // all available bytes. Check MaxHeapObjectSize() instead. 242 // all available bytes. Check MaxHeapObjectSize() instead.
243 static int Available(); 243 static int Available();
244 244
245 // Returns the maximum object size that heap supports. Objects larger than 245 // Returns the maximum object size in paged space.
246 // the maximum heap object size are allocated in a large object space. 246 static inline int MaxObjectSizeInPagedSpace();
247 static inline int MaxHeapObjectSize();
248 247
249 // Returns of size of all objects residing in the heap. 248 // Returns of size of all objects residing in the heap.
250 static int SizeOfObjects(); 249 static int SizeOfObjects();
251 250
252 // Return the starting address and a mask for the new space. And-masking an 251 // Return the starting address and a mask for the new space. And-masking an
253 // address with the mask will result in the start address of the new space 252 // address with the mask will result in the start address of the new space
254 // for all addresses in either semispace. 253 // for all addresses in either semispace.
255 static Address NewSpaceStart() { return new_space_.start(); } 254 static Address NewSpaceStart() { return new_space_.start(); }
256 static uint32_t NewSpaceMask() { return new_space_.mask(); } 255 static uint32_t NewSpaceMask() { return new_space_.mask(); }
257 static Address NewSpaceTop() { return new_space_.top(); } 256 static Address NewSpaceTop() { return new_space_.top(); }
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 822
824 // For keeping track of how much data has survived 823 // For keeping track of how much data has survived
825 // scavenge since last new space expansion. 824 // scavenge since last new space expansion.
826 static int survived_since_last_expansion_; 825 static int survived_since_last_expansion_;
827 826
828 static int always_allocate_scope_depth_; 827 static int always_allocate_scope_depth_;
829 static bool context_disposed_pending_; 828 static bool context_disposed_pending_;
830 829
831 static const int kMaxMapSpaceSize = 8*MB; 830 static const int kMaxMapSpaceSize = 8*MB;
832 831
832 static const int kMaxObjectSizeInNewSpace = 256*KB;
833
833 static NewSpace new_space_; 834 static NewSpace new_space_;
834 static OldSpace* old_pointer_space_; 835 static OldSpace* old_pointer_space_;
835 static OldSpace* old_data_space_; 836 static OldSpace* old_data_space_;
836 static OldSpace* code_space_; 837 static OldSpace* code_space_;
837 static MapSpace* map_space_; 838 static MapSpace* map_space_;
838 static LargeObjectSpace* lo_space_; 839 static LargeObjectSpace* lo_space_;
839 static HeapState gc_state_; 840 static HeapState gc_state_;
840 841
841 // Returns the size of object residing in non new spaces. 842 // Returns the size of object residing in non new spaces.
842 static int PromotedSpaceSize(); 843 static int PromotedSpaceSize();
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 int marked_count_; 1328 int marked_count_;
1328 1329
1329 // The count from the end of the previous full GC. Will be zero if there 1330 // The count from the end of the previous full GC. Will be zero if there
1330 // was no previous full GC. 1331 // was no previous full GC.
1331 int previous_marked_count_; 1332 int previous_marked_count_;
1332 }; 1333 };
1333 1334
1334 } } // namespace v8::internal 1335 } } // namespace v8::internal
1335 1336
1336 #endif // V8_HEAP_H_ 1337 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698