| OLD | NEW |
| 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 } else { | 734 } else { |
| 735 // Avoid underflow. | 735 // Avoid underflow. |
| 736 if (amount >= 0) { | 736 if (amount >= 0) { |
| 737 amount_of_external_allocated_memory_ = amount; | 737 amount_of_external_allocated_memory_ = amount; |
| 738 } | 738 } |
| 739 } | 739 } |
| 740 ASSERT(amount_of_external_allocated_memory_ >= 0); | 740 ASSERT(amount_of_external_allocated_memory_ >= 0); |
| 741 return amount_of_external_allocated_memory_; | 741 return amount_of_external_allocated_memory_; |
| 742 } | 742 } |
| 743 | 743 |
| 744 // Allocate unitialized fixed array (pretenure == NON_TENURE). |
| 745 static Object* AllocateRawFixedArray(int length); |
| 746 |
| 744 private: | 747 private: |
| 745 static int semispace_size_; | 748 static int semispace_size_; |
| 746 static int initial_semispace_size_; | 749 static int initial_semispace_size_; |
| 747 static int young_generation_size_; | 750 static int young_generation_size_; |
| 748 static int old_generation_size_; | 751 static int old_generation_size_; |
| 749 | 752 |
| 750 static int new_space_growth_limit_; | 753 static int new_space_growth_limit_; |
| 751 static int scavenge_count_; | 754 static int scavenge_count_; |
| 752 | 755 |
| 753 static const int kMaxMapSpaceSize = 8*MB; | 756 static const int kMaxMapSpaceSize = 8*MB; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 static Object* SmiOrNumberFromDouble(double value, | 831 static Object* SmiOrNumberFromDouble(double value, |
| 829 bool new_object, | 832 bool new_object, |
| 830 PretenureFlag pretenure = NOT_TENURED); | 833 PretenureFlag pretenure = NOT_TENURED); |
| 831 | 834 |
| 832 // Allocate an uninitialized object in map space. The behavior is identical | 835 // Allocate an uninitialized object in map space. The behavior is identical |
| 833 // to Heap::AllocateRaw(size_in_bytes, MAP_SPACE), except that (a) it doesn't | 836 // to Heap::AllocateRaw(size_in_bytes, MAP_SPACE), except that (a) it doesn't |
| 834 // have to test the allocation space argument and (b) can reduce code size | 837 // have to test the allocation space argument and (b) can reduce code size |
| 835 // (since both AllocateRaw and AllocateRawMap are inlined). | 838 // (since both AllocateRaw and AllocateRawMap are inlined). |
| 836 static inline Object* AllocateRawMap(int size_in_bytes); | 839 static inline Object* AllocateRawMap(int size_in_bytes); |
| 837 | 840 |
| 838 // Allocate unitialized fixed array (pretenure == NON_TENURE). | |
| 839 static Object* AllocateRawFixedArray(int length); | |
| 840 | |
| 841 // Initializes a JSObject based on its map. | 841 // Initializes a JSObject based on its map. |
| 842 static void InitializeJSObjectFromMap(JSObject* obj, | 842 static void InitializeJSObjectFromMap(JSObject* obj, |
| 843 FixedArray* properties, | 843 FixedArray* properties, |
| 844 Map* map); | 844 Map* map); |
| 845 | 845 |
| 846 static bool CreateInitialMaps(); | 846 static bool CreateInitialMaps(); |
| 847 static bool CreateInitialObjects(); | 847 static bool CreateInitialObjects(); |
| 848 static void CreateFixedStubs(); | 848 static void CreateFixedStubs(); |
| 849 static Object* CreateOddball(Map* map, | 849 static Object* CreateOddball(Map* map, |
| 850 const char* to_string, | 850 const char* to_string, |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 int marked_count_; | 1198 int marked_count_; |
| 1199 | 1199 |
| 1200 // The count from the end of the previous full GC. Will be zero if there | 1200 // The count from the end of the previous full GC. Will be zero if there |
| 1201 // was no previous full GC. | 1201 // was no previous full GC. |
| 1202 int previous_marked_count_; | 1202 int previous_marked_count_; |
| 1203 }; | 1203 }; |
| 1204 | 1204 |
| 1205 } } // namespace v8::internal | 1205 } } // namespace v8::internal |
| 1206 | 1206 |
| 1207 #endif // V8_HEAP_H_ | 1207 #endif // V8_HEAP_H_ |
| OLD | NEW |