| OLD | NEW | 
|     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 #include <map> |     9 #include <map> | 
|    10  |    10  | 
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   808   } |   808   } | 
|   809  |   809  | 
|   810   int64_t amount_of_external_allocated_memory() { |   810   int64_t amount_of_external_allocated_memory() { | 
|   811     return amount_of_external_allocated_memory_; |   811     return amount_of_external_allocated_memory_; | 
|   812   } |   812   } | 
|   813  |   813  | 
|   814   void update_amount_of_external_allocated_memory(int64_t delta) { |   814   void update_amount_of_external_allocated_memory(int64_t delta) { | 
|   815     amount_of_external_allocated_memory_ += delta; |   815     amount_of_external_allocated_memory_ += delta; | 
|   816   } |   816   } | 
|   817  |   817  | 
|   818   void update_amount_of_external_allocated_freed_memory(intptr_t freed) { |  | 
|   819     amount_of_external_allocated_memory_freed_.Increment(freed); |  | 
|   820   } |  | 
|   821  |  | 
|   822   void account_amount_of_external_allocated_freed_memory() { |  | 
|   823     amount_of_external_allocated_memory_ -= |  | 
|   824         amount_of_external_allocated_memory_freed_.Value(); |  | 
|   825     amount_of_external_allocated_memory_freed_.SetValue(0); |  | 
|   826   } |  | 
|   827  |  | 
|   828   void DeoptMarkedAllocationSites(); |   818   void DeoptMarkedAllocationSites(); | 
|   829  |   819  | 
|   830   bool DeoptMaybeTenuredAllocationSites() { |   820   bool DeoptMaybeTenuredAllocationSites() { | 
|   831     return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; |   821     return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0; | 
|   832   } |   822   } | 
|   833  |   823  | 
|   834   void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, |   824   void AddWeakObjectToCodeDependency(Handle<HeapObject> obj, | 
|   835                                      Handle<DependentCode> dep); |   825                                      Handle<DependentCode> dep); | 
|   836  |   826  | 
|   837   DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); |   827   DependentCode* LookupWeakObjectToCodeDependency(Handle<HeapObject> obj); | 
| (...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1985  |  1975  | 
|  1986   void set_force_oom(bool value) { force_oom_ = value; } |  1976   void set_force_oom(bool value) { force_oom_ = value; } | 
|  1987  |  1977  | 
|  1988   // The amount of external memory registered through the API kept alive |  1978   // The amount of external memory registered through the API kept alive | 
|  1989   // by global handles |  1979   // by global handles | 
|  1990   int64_t amount_of_external_allocated_memory_; |  1980   int64_t amount_of_external_allocated_memory_; | 
|  1991  |  1981  | 
|  1992   // Caches the amount of external memory registered at the last global gc. |  1982   // Caches the amount of external memory registered at the last global gc. | 
|  1993   int64_t amount_of_external_allocated_memory_at_last_global_gc_; |  1983   int64_t amount_of_external_allocated_memory_at_last_global_gc_; | 
|  1994  |  1984  | 
|  1995   base::AtomicNumber<intptr_t> amount_of_external_allocated_memory_freed_; |  | 
|  1996  |  | 
|  1997   // This can be calculated directly from a pointer to the heap; however, it is |  1985   // This can be calculated directly from a pointer to the heap; however, it is | 
|  1998   // more expedient to get at the isolate directly from within Heap methods. |  1986   // more expedient to get at the isolate directly from within Heap methods. | 
|  1999   Isolate* isolate_; |  1987   Isolate* isolate_; | 
|  2000  |  1988  | 
|  2001   Object* roots_[kRootListLength]; |  1989   Object* roots_[kRootListLength]; | 
|  2002  |  1990  | 
|  2003   size_t code_range_size_; |  1991   size_t code_range_size_; | 
|  2004   int max_semi_space_size_; |  1992   int max_semi_space_size_; | 
|  2005   int initial_semispace_size_; |  1993   int initial_semispace_size_; | 
|  2006   intptr_t max_old_generation_size_; |  1994   intptr_t max_old_generation_size_; | 
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2659   friend class LargeObjectSpace; |  2647   friend class LargeObjectSpace; | 
|  2660   friend class NewSpace; |  2648   friend class NewSpace; | 
|  2661   friend class PagedSpace; |  2649   friend class PagedSpace; | 
|  2662   DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |  2650   DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 
|  2663 }; |  2651 }; | 
|  2664  |  2652  | 
|  2665 }  // namespace internal |  2653 }  // namespace internal | 
|  2666 }  // namespace v8 |  2654 }  // namespace v8 | 
|  2667  |  2655  | 
|  2668 #endif  // V8_HEAP_HEAP_H_ |  2656 #endif  // V8_HEAP_HEAP_H_ | 
| OLD | NEW |