Home
last modified time | relevance | path

Searched refs:mapsize (Results 1 – 19 of 19) sorted by relevance

/illumos-gate/usr/src/contrib/ast/src/lib/libast/port/
H A Dastcopy.c56 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()
/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dwritefile.c47 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 …]
/illumos-gate/usr/src/cmd/svr4pkg/libinst/
H A Dcopyf.c204 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 …]
/illumos-gate/usr/src/cmd/fs.d/
H A Dpreenlib.c45 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 …]
/illumos-gate/usr/src/cmd/cat/
H A Dcat.c342 off_t mapsize, munmapsize; in cat() local
349 mapsize = (off_t)MAXMAPSIZE; in cat()
350 if (statp->st_size < mapsize) in cat()
351 mapsize = statp->st_size; in cat()
352 munmapsize = mapsize; in cat()
357 bufferp = mmap((caddr_t)NULL, (size_t)mapsize, PROT_READ, in cat()
360 mapsize = 0; /* I guess we can't mmap today */ in cat()
362 mapsize = 0; /* can't mmap non-regular files */ in cat()
364 if (mapsize != 0) { in cat()
389 nitems = (int)mapsize; in cat()
[all …]
/illumos-gate/usr/src/cmd/backup/dump/
H A Ddumponline.c204 static size_t mapsize; /* amount of mapped data */ variable
234 mapsize = bytes + (offset - mapoffset); in mapfile()
235 if (mapsize > MAXMAPSIZE) in mapfile()
236 mapsize = MAXMAPSIZE; in mapfile()
237 while ((mapbase = mmap((caddr_t)0, mapsize, PROT_READ, in mapfile()
239 errno == ENOMEM && mapsize >= MINMAPSIZE) { in mapfile()
244 mapsize /= 2; /* exponential back-off */ in mapfile()
261 (void) madvise(mapbase, mapsize, MADV_SEQUENTIAL); in mapfile()
263 mapend = mapbase + (mapsize - 1); in mapfile()
297 (void) msync(mapbase, mapsize, MS_ASYNC|MS_INVALIDATE); in unmapfile()
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Dsubr.c330 const size_t mapsize = straddles ? PAGESIZE * 2 : PAGESIZE; in hot_patch_kernel_text() local
335 vaddr = vmem_alloc(heap_arena, mapsize, VM_SLEEP); in hot_patch_kernel_text()
337 (void) as_pagelock(&kas, &ppp, ipageaddr, mapsize, S_WRITE); in hot_patch_kernel_text()
366 as_pageunlock(&kas, ppp, ipageaddr, mapsize, S_WRITE); in hot_patch_kernel_text()
367 hat_unload(kas.a_hat, vaddr, mapsize, HAT_UNLOAD_UNLOCK); in hot_patch_kernel_text()
368 vmem_free(heap_arena, vaddr, mapsize); in hot_patch_kernel_text()
H A Drmap.c33 rmallocmap(size_t mapsize) in rmallocmap() argument
41 rmallocmap_wait(size_t mapsize) in rmallocmap_wait() argument
/illumos-gate/usr/src/cmd/acpi/acpidump/
H A Dosillumostbl.c378 ACPI_SIZE mapsize = sizeof (ACPI_TABLE_RSDP); in OslLoadRsdp() local
387 mapp = AcpiOsMapMemory(physaddr, mapsize); in OslLoadRsdp()
394 AcpiTbScanMemoryForRsdp(mapp, mapsize)); in OslLoadRsdp()
400 AcpiOsUnmapMemory(mapp, mapsize); in OslLoadRsdp()
403 AcpiOsUnmapMemory(mapp, mapsize); in OslLoadRsdp()
449 mapsize = sizeof (ACPI_TABLE_RSDP); in OslLoadRsdp()
452 mapsize = ACPI_HI_RSDP_WINDOW_SIZE; in OslLoadRsdp()
455 mapp = AcpiOsMapMemory(physaddr, mapsize); in OslLoadRsdp()
461 AcpiTbScanMemoryForRsdp(mapp, mapsize)); in OslLoadRsdp()
463 AcpiOsUnmapMemory(mapp, mapsize); in OslLoadRsdp()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/disc/
H A Dsfdcdos.c43 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)
/illumos-gate/usr/src/cmd/fs.d/ufs/fsck/
H A Dpass5.c45 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()
/illumos-gate/usr/src/lib/libnsl/nss/
H A Dparse.c153 int mapsize, /* input size */ in _readbufline() argument
163 if (*lastlen >= mapsize) { in _readbufline()
/illumos-gate/usr/src/cmd/backup/restore/
H A Dtape.c189 size_t mapsize; in setup() local
341 mapsize = (size_t)d_howmany(maxino > MAXINO ? maxino : MAXINO, NBBY); in setup()
342 beginmap = map = calloc((size_t)1, mapsize); in setup()
348 endmap = map + mapsize; in setup()
371 mapsize = (size_t)d_howmany(maxino, NBBY); in setup()
372 beginmap = map = calloc((size_t)1, mapsize); in setup()
378 endmap = map + mapsize; in setup()
1399 int64_t mapsize, increment; in xtrmap() local
1416 mapsize = endmap - beginmap + increment; in xtrmap()
1417 if (mapsize > UINT_MAX) { in xtrmap()
[all …]
/illumos-gate/usr/src/uts/common/fs/zfs/sys/
H A Dzil.h131 #define ZIL_XVAT_SIZE(mapsize) \ argument
132 sizeof (lr_attr_t) + (sizeof (uint32_t) * (mapsize - 1)) + \
/illumos-gate/usr/src/lib/libresolv2/common/nameser/
H A Dns_name.c785 ns_name_map(ns_nname_ct nname, size_t namelen, ns_namemap_t map, int mapsize) { in ns_name_map() argument
815 l = ns_name_map(nname + n, namelen - n, map, mapsize); in ns_name_map()
820 if (l >= mapsize) { in ns_name_map()
/illumos-gate/usr/src/lib/libc/port/threads/
H A Dthr.c323 size_t mapsize; in find_stack() local
359 mapsize = stksize + guardsize; in find_stack()
365 if (ulwp->ul_mapsiz == mapsize && in find_stack()
398 if ((stk = mmap(NULL, mapsize, stackprot, in find_stack()
405 (void) munmap(stk, mapsize); in find_stack()
408 ulwp->ul_mapsiz = mapsize; in find_stack()
410 ulwp->ul_stktop = (uintptr_t)stk + mapsize; in find_stack()
/illumos-gate/usr/src/uts/i86pc/io/
H A Dmp_platform_common.c339 int i, mpct_size = 0, mapsize, retval = PSM_FAILURE; in apic_probe_common() local
387 mapsize = MPFPS_RAM_WIN_LEN; in apic_probe_common()
432 mapsize = MPFPS_ROM_WIN_LEN; in apic_probe_common()
467 psm_unmap_phys(fptr, mapsize); in apic_probe_common()
479 psm_unmap_phys(fptr, mapsize); /* unmap floating ptr struct */ in apic_probe_common()
/illumos-gate/usr/src/uts/common/syscall/
H A Dpoll.c2951 size_t mapsize; in pcache_create() local
2956 if ((mapsize = POLLMAPCHUNK) <= nfds) { in pcache_create()
2957 mapsize = (nfds + POLLMAPCHUNK - 1) & ~(POLLMAPCHUNK - 1); in pcache_create()
2959 pcp->pc_bitmap = kmem_zalloc((mapsize / BT_NBIPUL) * sizeof (ulong_t), in pcache_create()
2961 pcp->pc_mapsize = mapsize; in pcache_create()
/illumos-gate/usr/src/cmd/syslogd/
H A Dsyslogd.c4309 size_t pagesize, mapsize; in alloc_stacks() local
4328 mapsize = redzonesize + numstacks * (stacksize + redzonesize); in alloc_stacks()
4329 stack_top = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, in alloc_stacks()
4349 size_t pagesize, mapsize; in dealloc_stacks() local
4358 mapsize = redzonesize + numstacks * (stacksize + redzonesize); in dealloc_stacks()
4359 (void) munmap(cstack_ptr - mapsize, mapsize); in dealloc_stacks()