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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { | 659 bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) { |
660 return CommitRegion(address, size, is_executable); | 660 return CommitRegion(address, size, is_executable); |
661 } | 661 } |
662 | 662 |
663 | 663 |
664 bool VirtualMemory::Uncommit(void* address, size_t size) { | 664 bool VirtualMemory::Uncommit(void* address, size_t size) { |
665 return UncommitRegion(address, size); | 665 return UncommitRegion(address, size); |
666 } | 666 } |
667 | 667 |
668 | 668 |
| 669 bool VirtualMemory::Guard(void* address) { |
| 670 OS::Guard(address, OS::CommitPageSize()); |
| 671 return true; |
| 672 } |
| 673 |
| 674 |
669 void* VirtualMemory::ReserveRegion(size_t size) { | 675 void* VirtualMemory::ReserveRegion(size_t size) { |
670 void* result = mmap(OS::GetRandomMmapAddr(), | 676 void* result = mmap(OS::GetRandomMmapAddr(), |
671 size, | 677 size, |
672 PROT_NONE, | 678 PROT_NONE, |
673 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, | 679 MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, |
674 kMmapFd, | 680 kMmapFd, |
675 kMmapFdOffset); | 681 kMmapFdOffset); |
676 | 682 |
677 if (result == MAP_FAILED) return NULL; | 683 if (result == MAP_FAILED) return NULL; |
678 | 684 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 | 1246 |
1241 | 1247 |
1242 void Sampler::Stop() { | 1248 void Sampler::Stop() { |
1243 ASSERT(IsActive()); | 1249 ASSERT(IsActive()); |
1244 SignalSender::RemoveActiveSampler(this); | 1250 SignalSender::RemoveActiveSampler(this); |
1245 SetActive(false); | 1251 SetActive(false); |
1246 } | 1252 } |
1247 | 1253 |
1248 | 1254 |
1249 } } // namespace v8::internal | 1255 } } // namespace v8::internal |
OLD | NEW |