| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { | 394 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
| 395 return CommitRegion(address, size, is_executable); | 395 return CommitRegion(address, size, is_executable); |
| 396 } | 396 } |
| 397 | 397 |
| 398 | 398 |
| 399 bool VirtualMemory::Uncommit(void* address, size_t size) { | 399 bool VirtualMemory::Uncommit(void* address, size_t size) { |
| 400 return UncommitRegion(address, size); | 400 return UncommitRegion(address, size); |
| 401 } | 401 } |
| 402 | 402 |
| 403 | 403 |
| 404 bool VirtualMemory::Guard(void* address) { |
| 405 OS::Guard(address, OS::CommitPageSize()); |
| 406 return true; |
| 407 } |
| 408 |
| 409 |
| 404 void* VirtualMemory::ReserveRegion(size_t size) { | 410 void* VirtualMemory::ReserveRegion(size_t size) { |
| 405 void* result = mmap(OS::GetRandomMmapAddr(), | 411 void* result = mmap(OS::GetRandomMmapAddr(), |
| 406 size, | 412 size, |
| 407 PROT_NONE, | 413 PROT_NONE, |
| 408 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, | 414 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, |
| 409 kMmapFd, | 415 kMmapFd, |
| 410 kMmapFdOffset); | 416 kMmapFdOffset); |
| 411 | 417 |
| 412 if (result == MAP_FAILED) return NULL; | 418 if (result == MAP_FAILED) return NULL; |
| 413 | 419 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 } | 878 } |
| 873 | 879 |
| 874 | 880 |
| 875 void Sampler::Stop() { | 881 void Sampler::Stop() { |
| 876 ASSERT(IsActive()); | 882 ASSERT(IsActive()); |
| 877 SignalSender::RemoveActiveSampler(this); | 883 SignalSender::RemoveActiveSampler(this); |
| 878 SetActive(false); | 884 SetActive(false); |
| 879 } | 885 } |
| 880 | 886 |
| 881 } } // namespace v8::internal | 887 } } // namespace v8::internal |
| OLD | NEW |