Home
last modified time | relevance | path

Searched refs:prot (Results 1 – 14 of 14) sorted by relevance

/arkcompiler/runtime_core/platforms/windows/libpandabase/
Dmem.cpp38 static DWORD mem_protection_flags_for_page(const int prot) in mem_protection_flags_for_page() argument
42 if (static_cast<unsigned>(prot) == MMAP_PROT_NONE) { in mem_protection_flags_for_page()
46 if ((static_cast<unsigned>(prot) & MMAP_PROT_EXEC) != 0) { in mem_protection_flags_for_page()
47 …flags = ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) ? PAGE_EXECUTE_READWRITE : PAGE_EXE… in mem_protection_flags_for_page()
49 … flags = ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) ? PAGE_READWRITE : PAGE_READONLY; in mem_protection_flags_for_page()
55 static DWORD mem_protection_flags_for_file(const int prot, const uint32_t map_flags) in mem_protection_flags_for_file() argument
58 if (prot == MMAP_PROT_NONE) { in mem_protection_flags_for_file()
71 if ((static_cast<unsigned>(prot) & MMAP_PROT_READ) != 0) { in mem_protection_flags_for_file()
74 if ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) { in mem_protection_flags_for_file()
77 if ((static_cast<unsigned>(prot) & MMAP_PROT_EXEC) != 0) { in mem_protection_flags_for_file()
[all …]
Dwindows_mem.h31 void *mmap([[maybe_unused]] void *addr, size_t len, uint32_t prot, int flags, int fildes, off_t off…
/arkcompiler/ets_runtime/ecmascript/platform/windows/
Dmap.cpp39 MemMap PageMap(size_t size, int prot, size_t alignment) in PageMap() argument
44 void *result = VirtualAlloc(nullptr, allocSize, MEM_COMMIT, prot); in PageMap()
51 …LOG_ECMA(FATAL) << "PageMap "<< size << ", prot:" << prot << " fail, the error code is: " << errCo… in PageMap()
68 MemMap MachineCodePageMap(size_t size, int prot, size_t alignment) in MachineCodePageMap() argument
70 MemMap memMap = PageMap(size, prot, alignment); in MachineCodePageMap()
98 void PageProtect(void *mem, size_t size, int prot) in PageProtect() argument
101 if (!VirtualProtect(mem, size, prot, &oldProtect)) { in PageProtect()
103 LOG_ECMA(ERROR) << "PageProtect change to " << prot << " failed, error code is " << errCode; in PageProtect()
Dfile.cpp79 MemMap FileMap(const char *fileName, int flag, int prot, int64_t offset) in FileMap() argument
81 if (prot == PAGE_PROT_READWRITE) { in FileMap()
104 fd_t extra = CreateFileMapping(fd, NULL, prot, size >> 32, size & 0xffffffff, nullptr); in FileMap()
110 int accessor = (prot == PAGE_PROT_READ) ? FILE_MAP_READ : FILE_MAP_WRITE; in FileMap()
/arkcompiler/ets_runtime/ecmascript/platform/unix/
Dmap.cpp27 MemMap PageMap(size_t size, int prot, size_t alignment) in PageMap() argument
32 void *result = mmap(nullptr, allocSize, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); in PageMap()
53 MemMap MachineCodePageMap(size_t size, int prot, size_t alignment) in MachineCodePageMap() argument
55 MemMap memMap = PageMap(size, prot, alignment); in MachineCodePageMap()
88 void PageProtect(void *mem, size_t size, int prot) in PageProtect() argument
90 int ret = mprotect(mem, size, prot); in PageProtect()
92 LOG_ECMA(ERROR) << "PageProtect change to " << prot << " failed, error code is " << errno; in PageProtect()
Dfile.cpp77 MemMap FileMap(const char *fileName, int flag, int prot, int64_t offset) in FileMap() argument
92 void *addr = mmap(nullptr, size, prot, MAP_PRIVATE, fd, offset); in FileMap()
/arkcompiler/ets_runtime/ecmascript/mem/
Dmem_map_allocator.cpp39 int prot = isMachineCode ? PAGE_PROT_EXEC_READ : PAGE_PROT_READWRITE; in Allocate() local
41 PageProtect(mem.GetMem(), mem.GetSize(), prot); in Allocate()
52 int prot = isMachineCode ? PAGE_PROT_EXEC_READ : PAGE_PROT_READWRITE; in Allocate() local
54 PageProtect(mem.GetMem(), mem.GetSize(), prot); in Allocate()
/arkcompiler/ets_runtime/ecmascript/platform/
Dmap.h78 MemMap PUBLIC_API PageMap(size_t size, int prot = PAGE_PROT_NONE, size_t alignment = 0);
80 MemMap PUBLIC_API MachineCodePageMap(size_t size, int prot = PAGE_PROT_NONE, size_t alignment = 0);
87 void PageProtect(void *mem, size_t size, int prot);
Dfile.h70 MemMap FileMap(const char *fileName, int flag, int prot, int64_t offset = 0);
/arkcompiler/runtime_core/platforms/unix/libpandabase/
Dmem.cpp40 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset, vo… in MapFile() argument
45 void *result = mmap(hint, map_size, prot, flags, file.GetFd(), map_offset); in MapFile()
68 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot) in MakeMemWithProtFlag() argument
70 int r = mprotect(mem, size, prot); in MakeMemWithProtFlag()
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/
Dpgo_profiler_decoder.cpp129 bool PGOProfilerDecoder::LoadAPBinaryFile(int prot) in LoadAPBinaryFile() argument
142 fileMapAddr_ = FileMap(realPath.c_str(), FILE_RDONLY, prot); in LoadAPBinaryFile()
Dpgo_profiler_decoder.h146 bool LoadAPBinaryFile(int prot = PAGE_PROT_READ);
/arkcompiler/runtime_core/libpandabase/os/
Dmem.h50 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot);
300 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset = 0,
/arkcompiler/runtime_core/libpandafile/
Dfile.cpp79 uint32_t prot = os::mem::MMAP_PROT_READ; in GetProt() local
81 prot |= os::mem::MMAP_PROT_WRITE; in GetProt()
83 return prot; in GetProt()