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

Side by Side Diff: src/heap/heap.h

Issue 653033002: Break deserializer reservations into chunks that fit onto a page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebase Created 6 years, 2 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/compiler.cc ('k') | src/heap/heap.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 inline AllocationMemento* FindAllocationMemento(HeapObject* object); 1002 inline AllocationMemento* FindAllocationMemento(HeapObject* object);
1003 1003
1004 // An object may have an AllocationSite associated with it through a trailing 1004 // An object may have an AllocationSite associated with it through a trailing
1005 // AllocationMemento. Its feedback should be updated when objects are found 1005 // AllocationMemento. Its feedback should be updated when objects are found
1006 // in the heap. 1006 // in the heap.
1007 static inline void UpdateAllocationSiteFeedback(HeapObject* object, 1007 static inline void UpdateAllocationSiteFeedback(HeapObject* object,
1008 ScratchpadSlotMode mode); 1008 ScratchpadSlotMode mode);
1009 1009
1010 // Support for partial snapshots. After calling this we have a linear 1010 // Support for partial snapshots. After calling this we have a linear
1011 // space to write objects in each space. 1011 // space to write objects in each space.
1012 void ReserveSpace(int* sizes, Address* addresses); 1012 struct Chunk {
1013 uint32_t size;
1014 Address start;
1015 Address end;
1016 };
1017
1018 typedef List<Chunk> Reservation;
1019
1020 // Returns false if not able to reserve.
1021 bool ReserveSpace(Reservation* reservations);
1013 1022
1014 // 1023 //
1015 // Support for the API. 1024 // Support for the API.
1016 // 1025 //
1017 1026
1018 void CreateApiObjects(); 1027 void CreateApiObjects();
1019 1028
1020 inline intptr_t PromotedTotalSize() { 1029 inline intptr_t PromotedTotalSize() {
1021 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize(); 1030 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize();
1022 if (total > kMaxInt) return static_cast<intptr_t>(kMaxInt); 1031 if (total > kMaxInt) return static_cast<intptr_t>(kMaxInt);
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2540 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2532 2541
2533 private: 2542 private:
2534 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2543 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2535 }; 2544 };
2536 #endif // DEBUG 2545 #endif // DEBUG
2537 } 2546 }
2538 } // namespace v8::internal 2547 } // namespace v8::internal
2539 2548
2540 #endif // V8_HEAP_HEAP_H_ 2549 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698