| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // The maximum size of the virtual memory. 0 means there is no artificial | 186 // The maximum size of the virtual memory. 0 means there is no artificial |
| 187 // limit. | 187 // limit. |
| 188 static size_t GetLimit() V8_PURE; | 188 static size_t GetLimit() V8_PURE; |
| 189 | 189 |
| 190 // The page size and the granularity of page protection and commitment. | 190 // The page size and the granularity of page protection and commitment. |
| 191 static size_t GetPageSize() V8_PURE; | 191 static size_t GetPageSize() V8_PURE; |
| 192 | 192 |
| 193 // Returns true if OS performs lazy commits, i.e. the memory allocation call | 193 // Returns true if OS performs lazy commits, i.e. the memory allocation call |
| 194 // defers actual physical memory allocation till the first memory access. | 194 // defers actual physical memory allocation till the first memory access. |
| 195 // Otherwise returns false. | 195 // Otherwise returns false. |
| 196 static V8_INLINE(bool HasLazyCommits()) { | 196 static V8_INLINE bool HasLazyCommits() { |
| 197 #if V8_OS_LINUX | 197 #if V8_OS_LINUX |
| 198 return true; | 198 return true; |
| 199 #else | 199 #else |
| 200 return false; | 200 return false; |
| 201 #endif | 201 #endif |
| 202 } | 202 } |
| 203 | 203 |
| 204 private: | 204 private: |
| 205 void* address_; // Start address of the virtual memory. | 205 void* address_; // Start address of the virtual memory. |
| 206 size_t size_; // Size of the virtual memory. | 206 size_t size_; // Size of the virtual memory. |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } } // namespace v8::internal | 209 } } // namespace v8::internal |
| 210 | 210 |
| 211 #endif // V8_PLATFORM_VIRTUAL_MEMORY_H_ | 211 #endif // V8_PLATFORM_VIRTUAL_MEMORY_H_ |
| OLD | NEW |