OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 | 66 |
67 int Heap::amount_of_external_allocated_memory_ = 0; | 67 int Heap::amount_of_external_allocated_memory_ = 0; |
68 int Heap::amount_of_external_allocated_memory_at_last_global_gc_ = 0; | 68 int Heap::amount_of_external_allocated_memory_at_last_global_gc_ = 0; |
69 | 69 |
70 // semispace_size_ should be a power of 2 and old_generation_size_ should be | 70 // semispace_size_ should be a power of 2 and old_generation_size_ should be |
71 // a multiple of Page::kPageSize. | 71 // a multiple of Page::kPageSize. |
72 #if defined(ANDROID) | 72 #if defined(ANDROID) |
73 int Heap::semispace_size_ = 512*KB; | 73 int Heap::semispace_size_ = 512*KB; |
74 int Heap::old_generation_size_ = 128*MB; | 74 int Heap::old_generation_size_ = 128*MB; |
75 int Heap::initial_semispace_size_ = 128*KB; | 75 int Heap::initial_semispace_size_ = 128*KB; |
76 #elseif defined(V8_TARGET_ARCH_X64) | |
77 int Heap::semispace_size_ = 8*MB; | |
78 int Heap::old_generation_size_ = 1*GB; | |
Mads Ager (chromium)
2009/08/18 11:15:35
Not sure if old generation matters much.
| |
79 int Heap::initial_semispace_size_ = 1*MB; | |
76 #else | 80 #else |
77 int Heap::semispace_size_ = 4*MB; | 81 int Heap::semispace_size_ = 4*MB; |
78 int Heap::old_generation_size_ = 512*MB; | 82 int Heap::old_generation_size_ = 512*MB; |
79 int Heap::initial_semispace_size_ = 512*KB; | 83 int Heap::initial_semispace_size_ = 512*KB; |
80 #endif | 84 #endif |
81 | 85 |
82 GCCallback Heap::global_gc_prologue_callback_ = NULL; | 86 GCCallback Heap::global_gc_prologue_callback_ = NULL; |
83 GCCallback Heap::global_gc_epilogue_callback_ = NULL; | 87 GCCallback Heap::global_gc_epilogue_callback_ = NULL; |
84 | 88 |
85 // Variables set based on semispace_size_ and old_generation_size_ in | 89 // Variables set based on semispace_size_ and old_generation_size_ in |
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3881 #ifdef DEBUG | 3885 #ifdef DEBUG |
3882 bool Heap::GarbageCollectionGreedyCheck() { | 3886 bool Heap::GarbageCollectionGreedyCheck() { |
3883 ASSERT(FLAG_gc_greedy); | 3887 ASSERT(FLAG_gc_greedy); |
3884 if (Bootstrapper::IsActive()) return true; | 3888 if (Bootstrapper::IsActive()) return true; |
3885 if (disallow_allocation_failure()) return true; | 3889 if (disallow_allocation_failure()) return true; |
3886 return CollectGarbage(0, NEW_SPACE); | 3890 return CollectGarbage(0, NEW_SPACE); |
3887 } | 3891 } |
3888 #endif | 3892 #endif |
3889 | 3893 |
3890 } } // namespace v8::internal | 3894 } } // namespace v8::internal |
OLD | NEW |