diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 9d4421eaf3..ce69d15814 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -164,9 +164,10 @@ typedef double (*ModuloFunction)(double, double); // Define custom fmod implementation. ModuloFunction CreateModuloFunction() { size_t actual_size; - byte* buffer = static_cast(OS::Allocate(Assembler::kMinimalBufferSize, - &actual_size, - true)); + byte* buffer = static_cast(VirtualMemory::AllocateRegion( + Assembler::kMinimalBufferSize, + &actual_size, + VirtualMemory::EXECUTABLE)); CHECK(buffer); Assembler masm(NULL, buffer, static_cast(actual_size)); // Generated code is put into a fixed, unmovable, buffer, and not into