/titanic_41/usr/src/lib/libast/common/port/ |
H A D | astcopy.c | 56 off_t mapsize; in astcopy() local 70 mapsize = st.st_size - pos; in astcopy() 71 if (mapsize > MAPSIZE) mapsize = (mapsize > n && n > 0) ? n : MAPSIZE; in astcopy() 72 …if (mapsize >= BUFSIZ * 2 && (mapbuf = (char*)mmap(NiL, mapsize, PROT_READ, MAP_SHARED, rfd, pos))… in astcopy() 74 if (write(wfd, mapbuf, mapsize) != mapsize || lseek(rfd, mapsize, 1) == ((off_t)-1)) return(-1); in astcopy() 75 munmap((caddr_t)mapbuf, mapsize); in astcopy() 76 return(mapsize); in astcopy()
|
/titanic_41/usr/src/lib/libcmdutils/common/ |
H A D | writefile.c | 47 int mapsize, munmapsize; in writefile() local 105 mapsize = MAXMAPSIZE; in writefile() 106 if (s1p->st_size < mapsize) mapsize = s1p->st_size; in writefile() 107 munmapsize = mapsize; in writefile() 112 if ((cp = mmap((caddr_t)NULL, mapsize, PROT_READ, in writefile() 114 mapsize = 0; /* can't mmap today */ in writefile() 116 mapsize = 0; in writefile() 118 if (mapsize != 0) { in writefile() 122 nbytes = write(fo, cp, mapsize); in writefile() 128 if ((nbytes >= 0) && (nbytes != (int)mapsize)) { in writefile() [all …]
|
/titanic_41/usr/src/cmd/svr4pkg/libinst/ |
H A D | copyf.c | 204 size_t mapsize = 0; in copyFile() local 222 mapsize = MAXMAPSIZE; in copyFile() 223 if (filesize < mapsize) { in copyFile() 224 mapsize = filesize; in copyFile() 234 munmapsize = mapsize; in copyFile() 238 cp = mmap((caddr_t)NULL, mapsize, PROT_READ, in copyFile() 241 mapsize = 0; /* can't mmap today */ in copyFile() 249 if (mapsize == 0) { in copyFile() 313 nbytes = write(a_dstFd, cp, mapsize); in copyFile() 321 if ((nbytes >= 0) && (nbytes != (ssize_t)mapsize)) { in copyFile() [all …]
|
/titanic_41/usr/src/cmd/fs.d/ |
H A D | preenlib.c | 45 uint_t mapsize; /* size of `busymap' */ member 53 uint_t mapsize; /* size of `unitmap' */ member 234 rc = (*drvp->choosefunc)(devp->mapsize, devp->unitmap, in get_runnable() 235 drvp->mapsize, drvp->busymap); in get_runnable() 349 dp->mapsize = 0; in alloc_driver() 366 devp->mapsize = 0; in alloc_dev() 379 if (devp->mapsize < newsize) { in addunit() 380 devp->unitmap = devp->mapsize ? in addunit() 388 (void) memset((char *)&devp->unitmap[devp->mapsize], 0, in addunit() 389 (uint_t)((newsize - devp->mapsize) * sizeof (uint_t))); in addunit() [all …]
|
/titanic_41/usr/src/cmd/cat/ |
H A D | cat.c | 337 off_t mapsize, munmapsize; in cat() local 344 mapsize = (off_t)MAXMAPSIZE; in cat() 345 if (statp->st_size < mapsize) in cat() 346 mapsize = statp->st_size; in cat() 347 munmapsize = mapsize; in cat() 352 bufferp = mmap((caddr_t)NULL, (size_t)mapsize, PROT_READ, in cat() 355 mapsize = 0; /* I guess we can't mmap today */ in cat() 357 mapsize = 0; /* can't mmap non-regular files */ in cat() 359 if (mapsize != 0) { in cat() 384 nitems = (int)mapsize; in cat() [all …]
|
/titanic_41/usr/src/cmd/backup/dump/ |
H A D | dumponline.c | 210 static size_t mapsize; /* amount of mapped data */ variable 244 mapsize = bytes + (offset - mapoffset); 245 if (mapsize > MAXMAPSIZE) 246 mapsize = MAXMAPSIZE; 247 while ((mapbase = mmap((caddr_t)0, mapsize, PROT_READ, 249 errno == ENOMEM && mapsize >= MINMAPSIZE) { 254 mapsize /= 2; /* exponential back-off */ 271 (void) madvise(mapbase, mapsize, MADV_SEQUENTIAL); 273 mapend = mapbase + (mapsize - 1); 311 (void) msync(mapbase, mapsize, MS_ASYNC|MS_INVALIDATE); in unmapfile() [all …]
|
/titanic_41/usr/src/lib/libast/common/disc/ |
H A D | sfdcdos.c | 43 int mapsize; member 67 if((n=dp->maptop++)>=dp->mapsize) 69 dp->mapsize *= 2; 70 if(!(dp->maptable=(struct map*)realloc((void*)dp->maptable,(dp->mapsize+1)*sizeof(struct map)))) 73 dp->mapsize *= 2; 175 dp->mapsize = MINMAP; 381 if(dp->mapsize)
|
/titanic_41/usr/src/uts/common/os/ |
H A D | rmap.c | 35 rmallocmap(size_t mapsize) in rmallocmap() argument 43 rmallocmap_wait(size_t mapsize) in rmallocmap_wait() argument
|
/titanic_41/usr/src/cmd/acpi/acpidump/ |
H A D | osillumostbl.c | 370 ACPI_SIZE mapsize; in OslLoadRsdp() local 416 mapsize = sizeof (ACPI_TABLE_RSDP); in OslLoadRsdp() 419 mapsize = ACPI_HI_RSDP_WINDOW_SIZE; in OslLoadRsdp() 422 mapp = AcpiOsMapMemory(physaddr, mapsize); in OslLoadRsdp() 428 AcpiTbScanMemoryForRsdp(mapp, mapsize)); in OslLoadRsdp() 430 AcpiOsUnmapMemory(mapp, mapsize); in OslLoadRsdp() 437 AcpiOsUnmapMemory(mapp, mapsize); in OslLoadRsdp()
|
/titanic_41/usr/src/cmd/fs.d/ufs/fsck/ |
H A D | pass5.c | 45 size_t basesize, sumsize, mapsize; in pass5() local 105 mapsize = newcg->cg_nextfreeoff - newcg->cg_iusedoff; in pass5() 190 (void) memset((void *)cg_inosused(newcg), 0, (size_t)mapsize); in pass5() 193 sumsize + mapsize); in pass5() 457 int mapsize, /* size of above two maps */ in check_maps() argument 469 for (i = 0; i < mapsize; i++) { in check_maps()
|
/titanic_41/usr/src/lib/libnsl/nss/ |
H A D | parse.c | 155 int mapsize, /* input size */ in _readbufline() argument 165 if (*lastlen >= mapsize) { in _readbufline()
|
/titanic_41/usr/src/cmd/backup/restore/ |
H A D | tape.c | 188 size_t mapsize; in setup() local 340 mapsize = (size_t)d_howmany(maxino > MAXINO ? maxino : MAXINO, NBBY); in setup() 341 beginmap = map = calloc((size_t)1, mapsize); in setup() 347 endmap = map + mapsize; in setup() 370 mapsize = (size_t)d_howmany(maxino, NBBY); in setup() 371 beginmap = map = calloc((size_t)1, mapsize); in setup() 377 endmap = map + mapsize; in setup() 1402 int64_t mapsize, increment; in xtrmap() local 1419 mapsize = endmap - beginmap + increment; in xtrmap() 1420 if (mapsize > UINT_MAX) { in xtrmap() [all …]
|
/titanic_41/usr/src/uts/common/fs/zfs/sys/ |
H A D | zil.h | 119 #define ZIL_XVAT_SIZE(mapsize) \ argument 120 sizeof (lr_attr_t) + (sizeof (uint32_t) * (mapsize - 1)) + \
|
/titanic_41/usr/src/lib/libresolv2/common/nameser/ |
H A D | ns_name.c | 789 ns_name_map(ns_nname_ct nname, size_t namelen, ns_namemap_t map, int mapsize) { in ns_name_map() argument 819 l = ns_name_map(nname + n, namelen - n, map, mapsize); in ns_name_map() 824 if (l >= mapsize) { in ns_name_map()
|
/titanic_41/usr/src/lib/libc/port/threads/ |
H A D | thr.c | 321 size_t mapsize; in find_stack() local 357 mapsize = stksize + guardsize; in find_stack() 363 if (ulwp->ul_mapsiz == mapsize && in find_stack() 396 if ((stk = mmap(NULL, mapsize, stackprot, in find_stack() 403 (void) munmap(stk, mapsize); in find_stack() 406 ulwp->ul_mapsiz = mapsize; in find_stack() 408 ulwp->ul_stktop = (uintptr_t)stk + mapsize; in find_stack()
|
/titanic_41/usr/src/uts/i86pc/io/ |
H A D | mp_platform_common.c | 335 int i, mpct_size, mapsize, retval = PSM_FAILURE; in apic_probe_common() local 371 mapsize = MPFPS_RAM_WIN_LEN; in apic_probe_common() 410 mapsize = MPFPS_ROM_WIN_LEN; in apic_probe_common() 438 psm_unmap_phys(fptr, mapsize); in apic_probe_common() 448 psm_unmap_phys(fptr, mapsize); /* unmap floating ptr struct */ in apic_probe_common()
|
/titanic_41/usr/src/uts/common/syscall/ |
H A D | poll.c | 2704 size_t mapsize; in pcache_create() local 2709 if ((mapsize = POLLMAPCHUNK) <= nfds) { in pcache_create() 2710 mapsize = (nfds + POLLMAPCHUNK - 1) & ~(POLLMAPCHUNK - 1); in pcache_create() 2712 pcp->pc_bitmap = kmem_zalloc((mapsize / BT_NBIPUL) * sizeof (ulong_t), in pcache_create() 2714 pcp->pc_mapsize = mapsize; in pcache_create()
|
/titanic_41/usr/src/cmd/syslogd/ |
H A D | syslogd.c | 4324 size_t pagesize, mapsize; in alloc_stacks() local 4343 mapsize = redzonesize + numstacks * (stacksize + redzonesize); in alloc_stacks() 4344 stack_top = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, in alloc_stacks() 4364 size_t pagesize, mapsize; in dealloc_stacks() local 4373 mapsize = redzonesize + numstacks * (stacksize + redzonesize); in dealloc_stacks() 4374 (void) munmap(cstack_ptr - mapsize, mapsize); in dealloc_stacks()
|