Lines Matching refs:pMap

76 int sysCreatePrivateMap(size_t length, MemMapping* pMap)  in sysCreatePrivateMap()  argument
84 pMap->addr = pMap->baseAddr = memPtr; in sysCreatePrivateMap()
85 pMap->length = pMap->baseLength = length; in sysCreatePrivateMap()
122 int sysFakeMapFile(int fd, MemMapping* pMap) in sysFakeMapFile() argument
132 assert(pMap != NULL); in sysFakeMapFile()
145 pMap->baseAddr = pMap->addr = memPtr; in sysFakeMapFile()
146 pMap->baseLength = pMap->length = length; in sysFakeMapFile()
163 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) in sysMapFileInShmemWritableReadOnly() argument
170 assert(pMap != NULL); in sysMapFileInShmemWritableReadOnly()
190 pMap->baseAddr = pMap->addr = memPtr; in sysMapFileInShmemWritableReadOnly()
191 pMap->baseLength = pMap->length = length; in sysMapFileInShmemWritableReadOnly()
195 return sysFakeMapFile(fd, pMap); in sysMapFileInShmemWritableReadOnly()
207 MemMapping* pMap) in sysMapFileSegmentInShmem() argument
215 assert(pMap != NULL); in sysMapFileSegmentInShmem()
230 pMap->baseAddr = memPtr; in sysMapFileSegmentInShmem()
231 pMap->baseLength = actualLength; in sysMapFileSegmentInShmem()
232 pMap->addr = (char*)memPtr + adjust; in sysMapFileSegmentInShmem()
233 pMap->length = length; in sysMapFileSegmentInShmem()
237 pMap->baseAddr, (int) pMap->baseLength, in sysMapFileSegmentInShmem()
238 pMap->addr, (int) pMap->length); in sysMapFileSegmentInShmem()
253 MemMapping* pMap) in sysChangeMapAccess() argument
259 if (addr < pMap->baseAddr || in sysChangeMapAccess()
260 (u1*)addr >= (u1*)pMap->baseAddr + pMap->baseLength) in sysChangeMapAccess()
263 addr, pMap->baseAddr, (u1*)pMap->baseAddr + pMap->baseLength); in sysChangeMapAccess()
291 void sysReleaseShmem(MemMapping* pMap) in sysReleaseShmem() argument
294 if (pMap->baseAddr == NULL && pMap->baseLength == 0) in sysReleaseShmem()
297 if (munmap(pMap->baseAddr, pMap->baseLength) < 0) { in sysReleaseShmem()
299 pMap->baseAddr, pMap->baseLength, strerror(errno)); in sysReleaseShmem()
301 ALOGV("munmap(%p, %zd) succeeded", pMap->baseAddr, pMap->baseLength); in sysReleaseShmem()
302 pMap->baseAddr = NULL; in sysReleaseShmem()
303 pMap->baseLength = 0; in sysReleaseShmem()
307 if (pMap->baseAddr != NULL) { in sysReleaseShmem()
308 free(pMap->baseAddr); in sysReleaseShmem()
309 pMap->baseAddr = NULL; in sysReleaseShmem()
311 pMap->baseLength = 0; in sysReleaseShmem()