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

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: 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
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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 inline AllocationMemento* FindAllocationMemento(HeapObject* object); 995 inline AllocationMemento* FindAllocationMemento(HeapObject* object);
996 996
997 // An object may have an AllocationSite associated with it through a trailing 997 // An object may have an AllocationSite associated with it through a trailing
998 // AllocationMemento. Its feedback should be updated when objects are found 998 // AllocationMemento. Its feedback should be updated when objects are found
999 // in the heap. 999 // in the heap.
1000 static inline void UpdateAllocationSiteFeedback(HeapObject* object, 1000 static inline void UpdateAllocationSiteFeedback(HeapObject* object,
1001 ScratchpadSlotMode mode); 1001 ScratchpadSlotMode mode);
1002 1002
1003 // Support for partial snapshots. After calling this we have a linear 1003 // Support for partial snapshots. After calling this we have a linear
1004 // space to write objects in each space. 1004 // space to write objects in each space.
1005 void ReserveSpace(int* sizes, Address* addresses); 1005 struct Chunk {
1006 uint32_t size;
1007 Address start;
1008 Address end;
1009 };
1010
1011 typedef List<Chunk> Reservation;
1012
1013 // Returns false if not able to reserve.
1014 bool ReserveSpace(Reservation* reservations);
1006 1015
1007 // 1016 //
1008 // Support for the API. 1017 // Support for the API.
1009 // 1018 //
1010 1019
1011 void CreateApiObjects(); 1020 void CreateApiObjects();
1012 1021
1013 inline intptr_t PromotedTotalSize() { 1022 inline intptr_t PromotedTotalSize() {
1014 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize(); 1023 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize();
1015 if (total > kMaxInt) return static_cast<intptr_t>(kMaxInt); 1024 if (total > kMaxInt) return static_cast<intptr_t>(kMaxInt);
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2529 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2521 2530
2522 private: 2531 private:
2523 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2532 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2524 }; 2533 };
2525 #endif // DEBUG 2534 #endif // DEBUG
2526 } 2535 }
2527 } // namespace v8::internal 2536 } // namespace v8::internal
2528 2537
2529 #endif // V8_HEAP_HEAP_H_ 2538 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | src/serialize.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698