OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 // Returns allocated executable spaces in bytes. | 1085 // Returns allocated executable spaces in bytes. |
1086 intptr_t SizeExecutable() { return size_executable_; } | 1086 intptr_t SizeExecutable() { return size_executable_; } |
1087 | 1087 |
1088 // Returns maximum available bytes that the old space can have. | 1088 // Returns maximum available bytes that the old space can have. |
1089 intptr_t MaxAvailable() { | 1089 intptr_t MaxAvailable() { |
1090 return (Available() / Page::kPageSize) * Page::kMaxNonCodeHeapObjectSize; | 1090 return (Available() / Page::kPageSize) * Page::kMaxNonCodeHeapObjectSize; |
1091 } | 1091 } |
1092 | 1092 |
1093 // Returns an indication of whether a pointer is in a space that has | 1093 // Returns an indication of whether a pointer is in a space that has |
1094 // been allocated by this MemoryAllocator. | 1094 // been allocated by this MemoryAllocator. |
1095 V8_INLINE(bool IsOutsideAllocatedSpace(const void* address)) const { | 1095 V8_INLINE bool IsOutsideAllocatedSpace(const void* address) const { |
1096 return address < lowest_ever_allocated_ || | 1096 return address < lowest_ever_allocated_ || |
1097 address >= highest_ever_allocated_; | 1097 address >= highest_ever_allocated_; |
1098 } | 1098 } |
1099 | 1099 |
1100 #ifdef DEBUG | 1100 #ifdef DEBUG |
1101 // Reports statistic info of the space. | 1101 // Reports statistic info of the space. |
1102 void ReportStatistics(); | 1102 void ReportStatistics(); |
1103 #endif | 1103 #endif |
1104 | 1104 |
1105 // Returns a MemoryChunk in which the memory region from commit_area_size to | 1105 // Returns a MemoryChunk in which the memory region from commit_area_size to |
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 } | 2910 } |
2911 // Must be small, since an iteration is used for lookup. | 2911 // Must be small, since an iteration is used for lookup. |
2912 static const int kMaxComments = 64; | 2912 static const int kMaxComments = 64; |
2913 }; | 2913 }; |
2914 #endif | 2914 #endif |
2915 | 2915 |
2916 | 2916 |
2917 } } // namespace v8::internal | 2917 } } // namespace v8::internal |
2918 | 2918 |
2919 #endif // V8_SPACES_H_ | 2919 #endif // V8_SPACES_H_ |
OLD | NEW |