| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 limit += new_space_.Capacity(); | 1539 limit += new_space_.Capacity(); |
| 1540 // TODO(hpayer): Can be removed when when pretenuring is supported for all | 1540 // TODO(hpayer): Can be removed when when pretenuring is supported for all |
| 1541 // allocation sites. | 1541 // allocation sites. |
| 1542 if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { | 1542 if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { |
| 1543 limit *= 2; | 1543 limit *= 2; |
| 1544 } | 1544 } |
| 1545 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; | 1545 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; |
| 1546 return Min(limit, halfway_to_the_max); | 1546 return Min(limit, halfway_to_the_max); |
| 1547 } | 1547 } |
| 1548 | 1548 |
| 1549 // Indicates whether inline bump-pointer allocation has been disabled. |
| 1550 bool inline_allocation_disabled() { return inline_allocation_disabled_; } |
| 1551 |
| 1552 // Switch whether inline bump-pointer allocation should be used. |
| 1553 void EnableInlineAllocation(); |
| 1554 void DisableInlineAllocation(); |
| 1555 |
| 1549 // Implements the corresponding V8 API function. | 1556 // Implements the corresponding V8 API function. |
| 1550 bool IdleNotification(int hint); | 1557 bool IdleNotification(int hint); |
| 1551 | 1558 |
| 1552 // Declare all the root indices. | 1559 // Declare all the root indices. |
| 1553 enum RootListIndex { | 1560 enum RootListIndex { |
| 1554 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, | 1561 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, |
| 1555 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) | 1562 STRONG_ROOT_LIST(ROOT_INDEX_DECLARATION) |
| 1556 #undef ROOT_INDEX_DECLARATION | 1563 #undef ROOT_INDEX_DECLARATION |
| 1557 | 1564 |
| 1558 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, | 1565 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1985 // by global handles | 1992 // by global handles |
| 1986 intptr_t amount_of_external_allocated_memory_; | 1993 intptr_t amount_of_external_allocated_memory_; |
| 1987 | 1994 |
| 1988 // Caches the amount of external memory registered at the last global gc. | 1995 // Caches the amount of external memory registered at the last global gc. |
| 1989 intptr_t amount_of_external_allocated_memory_at_last_global_gc_; | 1996 intptr_t amount_of_external_allocated_memory_at_last_global_gc_; |
| 1990 | 1997 |
| 1991 // Indicates that an allocation has failed in the old generation since the | 1998 // Indicates that an allocation has failed in the old generation since the |
| 1992 // last GC. | 1999 // last GC. |
| 1993 bool old_gen_exhausted_; | 2000 bool old_gen_exhausted_; |
| 1994 | 2001 |
| 2002 // Indicates that inline bump-pointer allocation has been globally disabled |
| 2003 // for all spaces. This is used to disable allocations in generated code. |
| 2004 bool inline_allocation_disabled_; |
| 2005 |
| 1995 // Weak list heads, threaded through the objects. | 2006 // Weak list heads, threaded through the objects. |
| 1996 // List heads are initilized lazily and contain the undefined_value at start. | 2007 // List heads are initilized lazily and contain the undefined_value at start. |
| 1997 Object* native_contexts_list_; | 2008 Object* native_contexts_list_; |
| 1998 Object* array_buffers_list_; | 2009 Object* array_buffers_list_; |
| 1999 Object* allocation_sites_list_; | 2010 Object* allocation_sites_list_; |
| 2000 | 2011 |
| 2001 // WeakHashTable that maps objects embedded in optimized code to dependent | 2012 // WeakHashTable that maps objects embedded in optimized code to dependent |
| 2002 // code list. It is initilized lazily and contains the undefined_value at | 2013 // code list. It is initilized lazily and contains the undefined_value at |
| 2003 // start. | 2014 // start. |
| 2004 Object* weak_object_to_code_table_; | 2015 Object* weak_object_to_code_table_; |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3078 | 3089 |
| 3079 private: | 3090 private: |
| 3080 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3081 }; | 3092 }; |
| 3082 #endif // DEBUG | 3093 #endif // DEBUG |
| 3083 | 3094 |
| 3084 } } // namespace v8::internal | 3095 } } // namespace v8::internal |
| 3085 | 3096 |
| 3086 #endif // V8_HEAP_H_ | 3097 #endif // V8_HEAP_H_ |
| OLD | NEW |