Home
last modified time | relevance | path

Searched refs:prot (Results 1 - 24 of 24) sorted by relevance

/arkcompiler/runtime_core/platforms/windows/libpandabase/
H A 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_EXECUTE_READ; 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) in mem_protection_flags_for_file()
100 mmap([[maybe_unused]] void *addr, size_t len, uint32_t prot, int flags, int fildes, off_t off) mmap() argument
159 MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset, void *hint) MapFile() argument
185 MakeMemWithProtFlag(void *mem, size_t size, int prot) MakeMemWithProtFlag() argument
[all...]
H A Dwindows_mem.h31 void *mmap([[maybe_unused]] void *addr, size_t len, uint32_t prot, int flags, int fildes, off_t off);
/arkcompiler/runtime_core/static_core/platforms/windows/libpandabase/
H A Dmem.cpp40 static DWORD mem_protection_flags_for_page(const int prot) in mem_protection_flags_for_page() argument
44 if (static_cast<unsigned>(prot) == MMAP_PROT_NONE) { in mem_protection_flags_for_page()
48 if ((static_cast<unsigned>(prot) & MMAP_PROT_EXEC) != 0) { in mem_protection_flags_for_page()
49 flags = ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) ? PAGE_EXECUTE_READWRITE : PAGE_EXECUTE_READ; in mem_protection_flags_for_page()
51 flags = ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) ? PAGE_READWRITE : PAGE_READONLY; in mem_protection_flags_for_page()
57 static DWORD mem_protection_flags_for_file(const int prot, const uint32_t mapFlags) in mem_protection_flags_for_file() argument
60 if (prot == MMAP_PROT_NONE) { in mem_protection_flags_for_file()
73 if ((static_cast<unsigned>(prot) & MMAP_PROT_READ) != 0) { in mem_protection_flags_for_file()
76 if ((static_cast<unsigned>(prot) & MMAP_PROT_WRITE) != 0) { in mem_protection_flags_for_file()
79 if ((static_cast<unsigned>(prot) in mem_protection_flags_for_file()
103 mmap([[maybe_unused]] void *addr, size_t len, uint32_t prot, int flags, int fildes, off_t off) mmap() argument
163 MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t fileOffset, void *hint) MapFile() argument
189 MakeMemWithProtFlag(void *mem, size_t size, int prot) MakeMemWithProtFlag() argument
[all...]
H A 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/
H A Dmap.cpp39 MemMap PageMap(size_t size, int prot, size_t alignment, void *addr, [[maybe_unused]] int flags) in PageMap() argument
44 void *result = VirtualAlloc(addr, allocSize, MEM_COMMIT, prot); in PageMap()
51 LOG_ECMA(FATAL) << "PageMap "<< size << ", prot:" << prot << " fail, the error code is: " << errCode; 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()
101 bool PageProtect(void *mem, size_t size, int prot) in PageProtect() argument
104 if (!VirtualProtect(mem, size, prot, &oldProtect)) { in PageProtect()
107 ", change to " << prot << " failed, error code is " << errCode; in PageProtect()
H A Dfile.cpp93 MemMap FileMap(const char *fileName, int flag, int prot, int64_t offset) in FileMap() argument
95 if (prot == PAGE_PROT_READWRITE) { in FileMap()
118 fd_t extra = CreateFileMapping(fd, NULL, prot, size >> 32, size & 0xffffffff, nullptr); in FileMap()
124 int accessor = (prot == PAGE_PROT_READ) ? FILE_MAP_READ : FILE_MAP_WRITE; in FileMap()
134 MemMap FileMapForAlignAddress(const char *fileName, int flag, int prot, in FileMapForAlignAddress() argument
139 << " prot:" << prot << " offset:" << offset << " offStart:" << offStart; in FileMapForAlignAddress()
H A Dos.cpp66 void *PageMapExecFortSpace(void *addr, [[maybe_unused]] size_t size, [[maybe_unused]] int prot) in PageMapExecFortSpace() argument
/arkcompiler/ets_runtime/ecmascript/platform/unix/
H A Dmap.cpp25 MemMap PageMap(size_t size, int prot, size_t alignment, void *addr, int flags) in PageMap() argument
31 void *result = mmap(addr, allocSize, prot, newFlags, -1, 0); in PageMap()
52 MemMap MachineCodePageMap(size_t size, int prot, size_t alignment) in MachineCodePageMap() argument
54 MemMap memMap = PageMap(size, prot, alignment); in MachineCodePageMap()
95 bool PageProtect(void *mem, size_t size, int prot) in PageProtect() argument
97 int ret = mprotect(mem, size, prot); in PageProtect()
100 ", change to " << prot << " failed, ret = " << ret << ", error code is " << errno; in PageProtect()
H A Dfile.cpp100 MemMap FileMap(const char *fileName, int flag, int prot, int64_t offset) in FileMap() argument
115 void *addr = mmap(nullptr, size, prot, MAP_PRIVATE, fd, offset); in FileMap()
120 MemMap FileMapForAlignAddress(const char *fileName, int flag, int prot, in FileMapForAlignAddress() argument
135 void *addr = mmap(nullptr, size + offset - offStart, prot, MAP_PRIVATE, fd, offStart); in FileMapForAlignAddress()
/arkcompiler/ets_runtime/ecmascript/compiler/aot_file/
H A Dexecuted_memory_allocator.h29 static void AllocateBuf(uint32_t size, ExeMem &exeMem, int prot) in AllocateBuf() argument
31 // For safety reason, Disallow prot have both write & exec capability except in JIT. in AllocateBuf()
32 ASSERT(prot != PAGE_PROT_EXEC_READWRITE); in AllocateBuf()
33 MemMap buf = MachineCodePageMap(AlignUp(size, PageSize()), prot); in AllocateBuf()
/arkcompiler/ets_runtime/ecmascript/platform/unix/linux/
H A Dos.cpp95 void *PageMapExecFortSpace(void *addr, size_t size, int prot) in PageMapExecFortSpace() argument
97 void *res = mmap(addr, size, prot, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_EXECUTABLE, -1, 0); in PageMapExecFortSpace()
100 ", prot = " << prot << ", error code is " << errno; in PageMapExecFortSpace()
/arkcompiler/ets_runtime/ecmascript/platform/
H A Dmap.h70 // For safety reason, Disallow prot have both write & exec capability except in JIT.
77 // For safety reason, Disallow prot have both write & exec capability except in JIT.
94 MemMap PUBLIC_API PageMap(size_t size, int prot = PAGE_PROT_NONE, size_t alignment = 0, void *addr = nullptr,
97 MemMap PUBLIC_API MachineCodePageMap(size_t size, int prot = PAGE_PROT_NONE, size_t alignment = 0);
106 bool PageProtect(void *mem, size_t size, int prot);
H A Dfile.h73 MemMap PUBLIC_API FileMap(const char *fileName, int flag, int prot, int64_t offset = 0);
74 MemMap PUBLIC_API FileMapForAlignAddress(const char *fileName, int flag, int prot,
H A Dos.h36 void PUBLIC_API *PageMapExecFortSpace(void *addr, size_t size, int prot);
/arkcompiler/runtime_core/platforms/unix/libpandabase/
H A Dmem.cpp40 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset, void *hint) 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/runtime_core/static_core/platforms/unix/libpandabase/
H A Dmem.cpp42 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t fileOffset, void *hint) in MapFile() argument
48 mmap(hint, mapSize, static_cast<int>(prot), static_cast<int>(flags), file.GetFd(), static_cast<int>(mapOffset)); in MapFile()
71 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot) in MakeMemWithProtFlag() argument
73 int r = mprotect(mem, size, prot); in MakeMemWithProtFlag()
/arkcompiler/ets_runtime/ecmascript/mem/
H A Dmem_map_allocator.cpp80 int prot = machineCodeSpace ? PAGE_PROT_EXEC_READWRITE : PAGE_PROT_READWRITE; in PageProtectMem() local
83 return PageProtect(mem, size, prot); in PageProtectMem()
/arkcompiler/ets_runtime/ecmascript/pgo_profiler/
H A Dpgo_profiler_decoder.cpp149 bool PGOProfilerDecoder::LoadAPBinaryFile(int prot) in LoadAPBinaryFile() argument
162 fileMapAddr_ = FileMap(realPath.c_str(), FILE_RDONLY, prot); in LoadAPBinaryFile()
H A Dpgo_profiler_decoder.h219 bool LoadAPBinaryFile(int prot = PAGE_PROT_READ);
/arkcompiler/ets_runtime/ecmascript/platform/unix/mac/
H A Dos.cpp72 void *PageMapExecFortSpace(void *addr, [[maybe_unused]] size_t size, [[maybe_unused]] int prot) in PageMapExecFortSpace() argument
/arkcompiler/runtime_core/libpandabase/os/
H A Dmem.h44 * \brief Make memory region \param mem with size \param size with protection flags \param prot
47 * @param prot Memory protection flags, a combination of MMAP_PROT_XXX values
50 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot);
294 * @param prot - memory protection flags, a combination of MMAP_PROT_XXX values.
300 BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t file_offset = 0,
/arkcompiler/runtime_core/static_core/libpandabase/os/
H A Dmem.h46 * @brief Make memory region @param mem with size @param size with protection flags @param prot
49 * @param prot Memory protection flags, a combination of MMAP_PROT_XXX values
52 std::optional<Error> MakeMemWithProtFlag(void *mem, size_t size, int prot);
294 * @param prot - memory protection flags, a combination of MMAP_PROT_XXX values.
300 PANDA_PUBLIC_API BytePtr MapFile(file::File file, uint32_t prot, uint32_t flags, size_t size, size_t fileOffset = 0,
/arkcompiler/runtime_core/static_core/libpandafile/
H A Dfile.cpp80 uint32_t prot = os::mem::MMAP_PROT_READ; in GetProt() local
82 prot |= os::mem::MMAP_PROT_WRITE; in GetProt()
84 return prot; in GetProt()
/arkcompiler/runtime_core/libpandafile/
H A Dfile.cpp81 uint32_t prot = os::mem::MMAP_PROT_READ; in GetProt() local
83 prot |= os::mem::MMAP_PROT_WRITE; in GetProt()
85 return prot; in GetProt()

Completed in 22 milliseconds