Lines Matching refs:pMap
64 int sysCreatePrivateMap(size_t length, MemMapping* pMap)
72 pMap->addr = pMap->baseAddr = memPtr;
73 pMap->length = pMap->baseLength = length;
110 int sysFakeMapFile(int fd, MemMapping* pMap)
120 assert(pMap != NULL);
133 pMap->baseAddr = pMap->addr = memPtr;
134 pMap->baseLength = pMap->length = length;
148 * On success, returns 0 and fills out "pMap". On failure, returns a nonzero
149 * value and does not disturb "pMap".
151 int sysMapFileInShmemWritableReadOnly(int fd, MemMapping* pMap)
158 assert(pMap != NULL);
178 pMap->baseAddr = pMap->addr = memPtr;
179 pMap->baseLength = pMap->length = length;
183 return sysFakeMapFile(fd, pMap);
191 * On success, returns 0 and fills out "pMap". On failure, returns a nonzero
192 * value and does not disturb "pMap".
195 MemMapping* pMap)
203 assert(pMap != NULL);
218 pMap->baseAddr = memPtr;
219 pMap->baseLength = actualLength;
220 pMap->addr = (char*)memPtr + adjust;
221 pMap->length = length;
225 pMap->baseAddr, (int) pMap->baseLength,
226 pMap->addr, (int) pMap->length);
241 MemMapping* pMap)
247 if (addr < pMap->baseAddr ||
248 (u1*)addr >= (u1*)pMap->baseAddr + pMap->baseLength)
251 addr, pMap->baseAddr, (u1*)pMap->baseAddr + pMap->baseLength);
280 void sysReleaseShmem(MemMapping* pMap)
283 if (pMap->baseAddr == NULL && pMap->baseLength == 0)
286 if (munmap(pMap->baseAddr, pMap->baseLength) < 0) {
288 pMap->baseAddr, pMap->baseLength, strerror(errno));
290 ALOGV("munmap(%p, %zd) succeeded", pMap->baseAddr, pMap->baseLength);
291 pMap->baseAddr = NULL;
292 pMap->baseLength = 0;
296 if (pMap->baseAddr != NULL) {
297 free(pMap->baseAddr);
298 pMap->baseAddr = NULL;
300 pMap->baseLength = 0;