Lines Matching refs:pMap
64 int sysCreatePrivateMap(size_t length, MemMapping* pMap) in sysCreatePrivateMap() argument
72 pMap->addr = pMap->baseAddr = memPtr; in sysCreatePrivateMap()
73 pMap->length = pMap->baseLength = length; in sysCreatePrivateMap()
110 int sysFakeMapFile(int fd, MemMapping* pMap) in sysFakeMapFile() argument
120 assert(pMap != NULL); in sysFakeMapFile()
132 pMap->baseAddr = pMap->addr = memPtr; in sysFakeMapFile()
133 pMap->baseLength = pMap->length = length; in sysFakeMapFile()
150 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap) in sysMapFileInShmemWritableReadOnly() argument
157 assert(pMap != NULL); in sysMapFileInShmemWritableReadOnly()
177 pMap->baseAddr = pMap->addr = memPtr; in sysMapFileInShmemWritableReadOnly()
178 pMap->baseLength = pMap->length = length; in sysMapFileInShmemWritableReadOnly()
182 return sysFakeMapFile(fd, pMap); in sysMapFileInShmemWritableReadOnly()
194 MemMapping* pMap) in sysMapFileSegmentInShmem() argument
202 assert(pMap != NULL); in sysMapFileSegmentInShmem()
217 pMap->baseAddr = memPtr; in sysMapFileSegmentInShmem()
218 pMap->baseLength = actualLength; in sysMapFileSegmentInShmem()
219 pMap->addr = (char*)memPtr + adjust; in sysMapFileSegmentInShmem()
220 pMap->length = length; in sysMapFileSegmentInShmem()
224 pMap->baseAddr, (int) pMap->baseLength, in sysMapFileSegmentInShmem()
225 pMap->addr, (int) pMap->length); in sysMapFileSegmentInShmem()
240 MemMapping* pMap) in sysChangeMapAccess() argument
246 if (addr < pMap->baseAddr || in sysChangeMapAccess()
247 (u1*)addr >= (u1*)pMap->baseAddr + pMap->baseLength) in sysChangeMapAccess()
250 addr, pMap->baseAddr, (u1*)pMap->baseAddr + pMap->baseLength); in sysChangeMapAccess()
279 void sysReleaseShmem(MemMapping* pMap) in sysReleaseShmem() argument
282 if (pMap->baseAddr == NULL && pMap->baseLength == 0) in sysReleaseShmem()
285 if (munmap(pMap->baseAddr, pMap->baseLength) < 0) { in sysReleaseShmem()
287 pMap->baseAddr, pMap->baseLength, strerror(errno)); in sysReleaseShmem()
289 ALOGV("munmap(%p, %zd) succeeded", pMap->baseAddr, pMap->baseLength); in sysReleaseShmem()
290 pMap->baseAddr = NULL; in sysReleaseShmem()
291 pMap->baseLength = 0; in sysReleaseShmem()
295 if (pMap->baseAddr != NULL) { in sysReleaseShmem()
296 free(pMap->baseAddr); in sysReleaseShmem()
297 pMap->baseAddr = NULL; in sysReleaseShmem()
299 pMap->baseLength = 0; in sysReleaseShmem()