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 18 matching lines...) Expand all Loading... |
29 #define V8_HEAP_INL_H_ | 29 #define V8_HEAP_INL_H_ |
30 | 30 |
31 #include "heap.h" | 31 #include "heap.h" |
32 #include "objects.h" | 32 #include "objects.h" |
33 #include "v8-counters.h" | 33 #include "v8-counters.h" |
34 | 34 |
35 namespace v8 { | 35 namespace v8 { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
38 void Heap::UpdateOldSpaceLimits() { | 38 void Heap::UpdateOldSpaceLimits() { |
39 int old_gen_size = PromotedSpaceSize(); | 39 intptr_t old_gen_size = PromotedSpaceSize(); |
40 old_gen_promotion_limit_ = | 40 old_gen_promotion_limit_ = |
41 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); | 41 old_gen_size + Max(kMinimumPromotionLimit, old_gen_size / 3); |
42 old_gen_allocation_limit_ = | 42 old_gen_allocation_limit_ = |
43 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); | 43 old_gen_size + Max(kMinimumAllocationLimit, old_gen_size / 2); |
44 old_gen_exhausted_ = false; | 44 old_gen_exhausted_ = false; |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 int Heap::MaxObjectSizeInPagedSpace() { | 48 int Heap::MaxObjectSizeInPagedSpace() { |
49 return Page::kMaxHeapObjectSize; | 49 return Page::kMaxHeapObjectSize; |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 | 500 |
501 | 501 |
502 void ExternalStringTable::ShrinkNewStrings(int position) { | 502 void ExternalStringTable::ShrinkNewStrings(int position) { |
503 new_space_strings_.Rewind(position); | 503 new_space_strings_.Rewind(position); |
504 Verify(); | 504 Verify(); |
505 } | 505 } |
506 | 506 |
507 } } // namespace v8::internal | 507 } } // namespace v8::internal |
508 | 508 |
509 #endif // V8_HEAP_INL_H_ | 509 #endif // V8_HEAP_INL_H_ |
OLD | NEW |