Searched refs:mmapInfo (Results 1 – 5 of 5) sorted by relevance
/base/security/appverify/interfaces/innerkits/appverify/src/common/ |
D | random_access_file.cpp | 81 long long RandomAccessFile::DoMMap(int32_t bufCapacity, long long offset, MmapInfo& mmapInfo) in DoMMap() argument 87 mmapInfo.mapAddr = reinterpret_cast<char*>(MAP_FAILED); in DoMMap() 94 mmapInfo.mmapPosition = (offset / memoryPageSize) * memoryPageSize; in DoMMap() 95 mmapInfo.readMoreLen = static_cast<int>(offset - mmapInfo.mmapPosition); in DoMMap() 96 mmapInfo.mmapSize = bufCapacity + mmapInfo.readMoreLen; in DoMMap() 97 mmapInfo.mapAddr = reinterpret_cast<char*>(mmap(nullptr, mmapInfo.mmapSize, PROT_READ, in DoMMap() 98 MAP_SHARED | MAP_POPULATE, fd, mmapInfo.mmapPosition)); in DoMMap() 99 if (mmapInfo.mapAddr == MAP_FAILED) { in DoMMap() 112 MmapInfo mmapInfo; in ReadFileFullyFromOffset() local 113 long long ret = DoMMap(bufCapacity, offset, mmapInfo); in ReadFileFullyFromOffset() [all …]
|
/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
D | app_file.c | 66 int32_t HapMMap(int32_t bufCapacity, int32_t offset, MmapInfo *mmapInfo, const FileRead *file) in HapMMap() argument 68 if (mmapInfo == NULL || file == NULL || bufCapacity <= 0) { in HapMMap() 71 mmapInfo->mapAddr = (char*)(MAP_FAILED); in HapMMap() 82 mmapInfo->mmapPosition = (offset / g_memoryPageSize) * g_memoryPageSize; in HapMMap() 83 mmapInfo->readMoreLen = (int)(offset - mmapInfo->mmapPosition); in HapMMap() 84 mmapInfo->mmapSize = bufCapacity + mmapInfo->readMoreLen; in HapMMap() 85 mmapInfo->mapAddr = (char*)(mmap(NULL, mmapInfo->mmapSize, PROT_READ, in HapMMap() 86 MAP_SHARED, file->fp, mmapInfo->mmapPosition)); in HapMMap() 87 if (mmapInfo->mapAddr == MAP_FAILED) { in HapMMap()
|
D | app_centraldirectory.c | 98 MmapInfo mmapInfo = {0}; in GetEocd() local 102 int32_t ret = HapMMap(hapFile->len, 0, &mmapInfo, hapFile); in GetEocd() 107 char *fileStart = (char *)(mmapInfo.mapAddr + mmapInfo.readMoreLen); in GetEocd() 112 HapMUnMap(mmapInfo.mapAddr, mmapInfo.mmapSize); in GetEocd() 116 HapMUnMap(mmapInfo.mapAddr, mmapInfo.mmapSize); in GetEocd() 131 HapMUnMap(mmapInfo.mapAddr, mmapInfo.mmapSize); in GetEocd() 135 HapMUnMap(mmapInfo.mapAddr, mmapInfo.mmapSize); in GetEocd() 142 HapMUnMap(mmapInfo.mapAddr, mmapInfo.mmapSize); in GetEocd()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/include/ |
D | app_file.h | 52 int32_t HapMMap(int32_t bufCapacity, int32_t offset, MmapInfo *mmapInfo, const FileRead *file);
|
/base/security/appverify/interfaces/innerkits/appverify/include/common/ |
D | random_access_file.h | 43 long long DoMMap(int32_t bufCapacity, long long offset, MmapInfo& mmapInfo);
|