Lines Matching refs:memPtr
66 void* memPtr; in sysCreatePrivateMap() local
68 memPtr = sysCreateAnonShmem(length); in sysCreatePrivateMap()
69 if (memPtr == NULL) in sysCreatePrivateMap()
72 pMap->addr = pMap->baseAddr = memPtr; in sysCreatePrivateMap()
118 void* memPtr; in sysFakeMapFile() local
125 memPtr = malloc(length); in sysFakeMapFile()
126 if (read(fd, memPtr, length) < 0) { in sysFakeMapFile()
132 pMap->baseAddr = pMap->addr = memPtr; in sysFakeMapFile()
155 void* memPtr; in sysMapFileInShmemWritableReadOnly() local
162 memPtr = mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, in sysMapFileInShmemWritableReadOnly()
164 if (memPtr == MAP_FAILED) { in sysMapFileInShmemWritableReadOnly()
169 if (mprotect(memPtr, length, PROT_READ) < 0) { in sysMapFileInShmemWritableReadOnly()
173 memPtr, length, strerror(err)); in sysMapFileInShmemWritableReadOnly()
177 pMap->baseAddr = pMap->addr = memPtr; in sysMapFileInShmemWritableReadOnly()
200 void* memPtr; in sysMapFileSegmentInShmem() local
209 memPtr = mmap(NULL, actualLength, PROT_READ, MAP_FILE | MAP_SHARED, in sysMapFileSegmentInShmem()
211 if (memPtr == MAP_FAILED) { in sysMapFileSegmentInShmem()
217 pMap->baseAddr = memPtr; in sysMapFileSegmentInShmem()
219 pMap->addr = (char*)memPtr + adjust; in sysMapFileSegmentInShmem()