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 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3250 } | 3250 } |
3251 | 3251 |
3252 LOG(IntEvent("heap-capacity", Capacity())); | 3252 LOG(IntEvent("heap-capacity", Capacity())); |
3253 LOG(IntEvent("heap-available", Available())); | 3253 LOG(IntEvent("heap-available", Available())); |
3254 | 3254 |
3255 return true; | 3255 return true; |
3256 } | 3256 } |
3257 | 3257 |
3258 | 3258 |
3259 void Heap::SetStackLimit(intptr_t limit) { | 3259 void Heap::SetStackLimit(intptr_t limit) { |
| 3260 // We don't use this on x86-64 yet, but we need to remove the top |
| 3261 // bits or it won't be a valid Smi. This has no effect on 32 bit |
| 3262 // architectures. |
| 3263 limit &= 0xfffffffful; |
3260 // Set up the special root array entry containing the stack guard. | 3264 // Set up the special root array entry containing the stack guard. |
3261 // This is actually an address, but the tag makes the GC ignore it. | 3265 // This is actually an address, but the tag makes the GC ignore it. |
3262 set_stack_limit(Smi::FromInt(limit >> kSmiTagSize)); | 3266 set_stack_limit(Smi::FromInt(limit >> kSmiTagSize)); |
3263 } | 3267 } |
3264 | 3268 |
3265 | 3269 |
3266 void Heap::TearDown() { | 3270 void Heap::TearDown() { |
3267 GlobalHandles::TearDown(); | 3271 GlobalHandles::TearDown(); |
3268 | 3272 |
3269 new_space_.TearDown(); | 3273 new_space_.TearDown(); |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3966 #ifdef DEBUG | 3970 #ifdef DEBUG |
3967 bool Heap::GarbageCollectionGreedyCheck() { | 3971 bool Heap::GarbageCollectionGreedyCheck() { |
3968 ASSERT(FLAG_gc_greedy); | 3972 ASSERT(FLAG_gc_greedy); |
3969 if (Bootstrapper::IsActive()) return true; | 3973 if (Bootstrapper::IsActive()) return true; |
3970 if (disallow_allocation_failure()) return true; | 3974 if (disallow_allocation_failure()) return true; |
3971 return CollectGarbage(0, NEW_SPACE); | 3975 return CollectGarbage(0, NEW_SPACE); |
3972 } | 3976 } |
3973 #endif | 3977 #endif |
3974 | 3978 |
3975 } } // namespace v8::internal | 3979 } } // namespace v8::internal |
OLD | NEW |