OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SPACES_H_ | 5 #ifndef V8_SPACES_H_ |
6 #define V8_SPACES_H_ | 6 #define V8_SPACES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/base/platform/mutex.h" | 10 #include "src/base/platform/mutex.h" |
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2010 // size limit has been hit. | 2010 // size limit has been hit. |
2011 bool Expand(); | 2011 bool Expand(); |
2012 | 2012 |
2013 // Generic fast case allocation function that tries linear allocation at the | 2013 // Generic fast case allocation function that tries linear allocation at the |
2014 // address denoted by top in allocation_info_. | 2014 // address denoted by top in allocation_info_. |
2015 inline HeapObject* AllocateLinearly(int size_in_bytes); | 2015 inline HeapObject* AllocateLinearly(int size_in_bytes); |
2016 | 2016 |
2017 // If sweeping is still in progress try to sweep unswept pages. If that is | 2017 // If sweeping is still in progress try to sweep unswept pages. If that is |
2018 // not successful, wait for the sweeper threads and re-try free-list | 2018 // not successful, wait for the sweeper threads and re-try free-list |
2019 // allocation. | 2019 // allocation. |
2020 MUST_USE_RESULT HeapObject* EnsureSweepingProgress(int size_in_bytes); | 2020 MUST_USE_RESULT HeapObject* EnsureSweepingProgress(intptr_t size_in_bytes); |
2021 | 2021 |
2022 // Slow path of AllocateRaw. This function is space-dependent. | 2022 // Slow path of AllocateRaw. This function is space-dependent. |
2023 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes); | 2023 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes); |
2024 | 2024 |
2025 friend class PageIterator; | 2025 friend class PageIterator; |
2026 friend class MarkCompactCollector; | 2026 friend class MarkCompactCollector; |
2027 }; | 2027 }; |
2028 | 2028 |
2029 | 2029 |
2030 class NumberAndSizeInfo BASE_EMBEDDED { | 2030 class NumberAndSizeInfo BASE_EMBEDDED { |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3016 } | 3016 } |
3017 // Must be small, since an iteration is used for lookup. | 3017 // Must be small, since an iteration is used for lookup. |
3018 static const int kMaxComments = 64; | 3018 static const int kMaxComments = 64; |
3019 }; | 3019 }; |
3020 #endif | 3020 #endif |
3021 | 3021 |
3022 | 3022 |
3023 } } // namespace v8::internal | 3023 } } // namespace v8::internal |
3024 | 3024 |
3025 #endif // V8_SPACES_H_ | 3025 #endif // V8_SPACES_H_ |
OLD | NEW |