| 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 size_t msize = RoundUp(requested, static_cast<int>(GetPageSize())); | 822 size_t msize = RoundUp(requested, static_cast<int>(GetPageSize())); |
| 823 | 823 |
| 824 // Windows XP SP2 allows Data Excution Prevention (DEP). | 824 // Windows XP SP2 allows Data Excution Prevention (DEP). |
| 825 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; | 825 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; |
| 826 | 826 |
| 827 LPVOID mbase = RandomizedVirtualAlloc(msize, | 827 LPVOID mbase = RandomizedVirtualAlloc(msize, |
| 828 MEM_COMMIT | MEM_RESERVE, | 828 MEM_COMMIT | MEM_RESERVE, |
| 829 prot); | 829 prot); |
| 830 | 830 |
| 831 if (mbase == NULL) { | 831 if (mbase == NULL) { |
| 832 LOG(ISOLATE, StringEvent("OS::Allocate", "VirtualAlloc failed")); | 832 LOG(Isolate::Current(), StringEvent("OS::Allocate", "VirtualAlloc failed")); |
| 833 return NULL; | 833 return NULL; |
| 834 } | 834 } |
| 835 | 835 |
| 836 ASSERT(IsAligned(reinterpret_cast<size_t>(mbase), OS::AllocateAlignment())); | 836 ASSERT(IsAligned(reinterpret_cast<size_t>(mbase), OS::AllocateAlignment())); |
| 837 | 837 |
| 838 *allocated = msize; | 838 *allocated = msize; |
| 839 return mbase; | 839 return mbase; |
| 840 } | 840 } |
| 841 | 841 |
| 842 | 842 |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 ASSERT(result); | 1569 ASSERT(result); |
| 1570 } | 1570 } |
| 1571 | 1571 |
| 1572 | 1572 |
| 1573 | 1573 |
| 1574 void Thread::YieldCPU() { | 1574 void Thread::YieldCPU() { |
| 1575 Sleep(0); | 1575 Sleep(0); |
| 1576 } | 1576 } |
| 1577 | 1577 |
| 1578 } } // namespace v8::internal | 1578 } } // namespace v8::internal |
| OLD | NEW |