| /freebsd-12.1/sys/vm/ |
| H A D | redzone.c | 76 u_long nsize; in redzone_get_size() local 78 bcopy(naddr - REDZONE_CHSIZE - sizeof(u_long), &nsize, sizeof(nsize)); in redzone_get_size() 79 return (nsize); in redzone_get_size() 86 return (nsize + redzone_roundup(nsize) + REDZONE_FSIZE); in redzone_size_ntor() 105 atomic_add_long(&redzone_extra_mem, redzone_size_ntor(nsize) - nsize); in redzone_setup() 114 bcopy(&nsize, haddr, sizeof(nsize)); in redzone_setup() 135 u_long nsize; in redzone_check() local 141 bcopy(haddr, &nsize, sizeof(nsize)); in redzone_check() 145 redzone_size_ntor(nsize) - nsize); in redzone_check() 165 faddr = naddr + nsize; in redzone_check() [all …]
|
| H A D | redzone.h | 35 u_long redzone_size_ntor(u_long nsize); 37 void *redzone_setup(caddr_t raddr, u_long nsize);
|
| H A D | vm_unix.c | 66 char *nsize; member 76 addr = (uintptr_t)uap->nsize; in sys_break()
|
| H A D | vnode_pager.c | 418 vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize) in vnode_pager_setsize() argument 434 if (nsize == object->un_pager.vnp.vnp_size) { in vnode_pager_setsize() 441 nobjsize = OFF_TO_IDX(nsize + PAGE_MASK); in vnode_pager_setsize() 442 if (nsize < object->un_pager.vnp.vnp_size) { in vnode_pager_setsize() 457 if ((nsize & PAGE_MASK) && in vnode_pager_setsize() 458 (m = vm_page_lookup(object, OFF_TO_IDX(nsize))) != NULL && in vnode_pager_setsize() 460 int base = (int)nsize & PAGE_MASK; in vnode_pager_setsize() 493 object->un_pager.vnp.vnp_size = nsize; in vnode_pager_setsize()
|
| /freebsd-12.1/usr.bin/indent/ |
| H A D | indent_globs.h | 57 int nsize = l_code-s_code + 400 + desired_size; \ 59 codebuf = (char *) realloc(codebuf, nsize); \ 63 l_code = codebuf + nsize - 5; \ 68 int nsize = l_com-s_com + 400 + desired_size; \ 75 combuf = (char *) realloc(combuf, nsize); \ 81 l_com = combuf + nsize - 5; \ 86 int nsize = l_lab-s_lab + 400 + desired_size; \ 88 labbuf = (char *) realloc(labbuf, nsize); \ 92 l_lab = labbuf + nsize - 5; \ 99 tokenbuf = (char *) realloc(tokenbuf, nsize); \ [all …]
|
| /freebsd-12.1/contrib/lua/src/ |
| H A D | lmem.c | 77 void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { in luaM_realloc_() argument 83 if (nsize > realosize && g->gcrunning) in luaM_realloc_() 86 newblock = (*g->frealloc)(g->ud, block, osize, nsize); in luaM_realloc_() 87 if (newblock == NULL && nsize > 0) { in luaM_realloc_() 88 lua_assert(nsize > realosize); /* cannot fail when shrinking a block */ in luaM_realloc_() 91 newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ in luaM_realloc_() 96 lua_assert((nsize == 0) == (newblock == NULL)); in luaM_realloc_() 97 g->GCdebt = (g->GCdebt + nsize) - realosize; in luaM_realloc_()
|
| /freebsd-12.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ |
| H A D | lmem.c | 75 void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { in luaM_realloc_() argument 81 if (nsize > realosize && g->gcrunning) in luaM_realloc_() 84 newblock = (*g->frealloc)(g->ud, block, osize, nsize); in luaM_realloc_() 85 if (newblock == NULL && nsize > 0) { in luaM_realloc_() 86 api_check(L, nsize > realosize, in luaM_realloc_() 90 newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ in luaM_realloc_() 95 lua_assert((nsize == 0) == (newblock == NULL)); in luaM_realloc_() 96 g->GCdebt = (g->GCdebt + nsize) - realosize; in luaM_realloc_()
|
| /freebsd-12.1/contrib/openpam/lib/libpam/ |
| H A D | pam_set_item.c | 64 size_t nsize, osize; in pam_set_item() local 68 osize = nsize = 0; in pam_set_item() 88 nsize = strlen(item) + 1; in pam_set_item() 91 osize = nsize = sizeof(struct pam_repository); in pam_set_item() 94 osize = nsize = sizeof(struct pam_conv); in pam_set_item() 104 if ((*slot = malloc(nsize)) == NULL) in pam_set_item() 106 memcpy(*slot, item, nsize); in pam_set_item()
|
| /freebsd-12.1/contrib/netbsd-tests/sbin/resize_ffs/ |
| H A D | common.sh | 114 local nsize=$4 140 if [ ${nsize} -lt ${osize} ]; then 142 local remove=$((numdata-numdata*nsize/osize)) 150 atf_check -s exit:0 -o ignore resize_ffs -c -y -s ${nsize} ${IMG} 151 atf_check -s exit:0 -o ignore resize_ffs -y -s ${nsize} ${IMG} 154 if [ ${nsize} -lt ${osize} ]; then 161 atf_check -s exit:1 -o ignore resize_ffs -c -y -s ${nsize} ${IMG}
|
| /freebsd-12.1/sys/dev/ofw/ |
| H A D | ofw_subr.c | 86 uint32_t c, nbridge, naddr, nsize; in ofw_reg_to_paddr() local 102 get_addr_props(bridge, &naddr, &nsize, &pci); in ofw_reg_to_paddr() 110 regno *= naddr + nsize; in ofw_reg_to_paddr() 111 if (regno + naddr + nsize > res) in ofw_reg_to_paddr() 119 for (c = 0; c < nsize; c++) in ofw_reg_to_paddr() 149 regno += naddr + nbridge + nsize; in ofw_reg_to_paddr() 162 for (c = 0; c < nsize; c++) in ofw_reg_to_paddr() 173 get_addr_props(bridge, &naddr, &nsize, &pci); in ofw_reg_to_paddr()
|
| /freebsd-12.1/usr.sbin/makefs/ffs/ |
| H A D | ffs_balloc.c | 90 int osize, nsize, num, i, error; in ffs_balloc_ufs1() local 154 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 155 if (nsize <= osize) { in ffs_balloc_ufs1() 184 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 186 nsize = fs->fs_bsize; in ffs_balloc_ufs1() 190 nsize, &newb); in ffs_balloc_ufs1() 341 int osize, nsize, num, i, error; in ffs_balloc_ufs2() local 405 nsize = fragroundup(fs, size); in ffs_balloc_ufs2() 406 if (nsize <= osize) { in ffs_balloc_ufs2() 437 nsize = fs->fs_bsize; in ffs_balloc_ufs2() [all …]
|
| /freebsd-12.1/sys/ufs/ffs/ |
| H A D | ffs_balloc.c | 189 if (nsize <= osize) { in ffs_balloc_ufs1() 207 nsize, osize, bp); in ffs_balloc_ufs1() 213 nsize = fs->fs_bsize; in ffs_balloc_ufs1() 226 nsize, 0, bp); in ffs_balloc_ufs1() 682 if (nsize <= osize) { in ffs_balloc_ufs2() 704 nsize, osize, bp); in ffs_balloc_ufs2() 710 nsize = fs->fs_bsize; in ffs_balloc_ufs2() 724 nsize, 0, bp); in ffs_balloc_ufs2() 787 if (nsize <= osize) { in ffs_balloc_ufs2() 812 nsize = fs->fs_bsize; in ffs_balloc_ufs2() [all …]
|
| H A D | ffs_alloc.c | 250 int osize, nsize, flags; 274 (u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { 278 nsize, fs->fs_fsmnt); 329 delta = btodb(nsize - osize); 335 allocbuf(bp, nsize); 357 request = nsize; 413 delta = btodb(nsize - osize); 419 allocbuf(bp, nsize); 1659 ffs_fragextend(ip, cg, bprev, osize, nsize) in ffs_fragextend() argument 1663 int osize, nsize; [all …]
|
| /freebsd-12.1/usr.sbin/kgzip/ |
| H A D | kgzcmp.c | 84 unsigned x = (sizeof(struct kgz_hdr) + kh->nsize) & (16 - 1); in kgzcmp() 90 ahdr0.a.a_data += kh->nsize + x; in kgzcmp() 95 ehdr.st[KGZ_ST_KGZ_NDATA].st_size = htole32(kh->nsize); in kgzcmp() 97 htole32(le32toh(ehdr.sh[KGZ_SH_DATA].sh_size) + kh->nsize); in kgzcmp() 106 khle.nsize = htole32(khle.nsize); in kgzcmp() 170 kh->nsize = sb.st_size - off; in mk_data()
|
| H A D | kgz.h | 53 uint32_t nsize; /* encoded image size */ member
|
| /freebsd-12.1/usr.sbin/makefs/msdos/ |
| H A D | msdosfs_vnops.c | 440 size_t nsize, offs; in msdosfs_wfile() local 457 nsize = st->st_size; in msdosfs_wfile() 458 MSDOSFS_DPRINTF(("%s(nsize=%zu, osize=%zu)\n", __func__, nsize, osize)); in msdosfs_wfile() 459 if (nsize > osize) { in msdosfs_wfile() 460 if ((error = deextend(dep, nsize)) != 0) in msdosfs_wfile() 472 if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) in msdosfs_wfile() 482 for (offs = 0; offs < nsize;) { in msdosfs_wfile() 499 cpsize = MIN((nsize - offs), blsize - on); in msdosfs_wfile() 505 munmap(dat, nsize); in msdosfs_wfile() 508 munmap(dat, nsize); in msdosfs_wfile()
|
| /freebsd-12.1/cddl/contrib/opensolaris/lib/libdtrace/common/ |
| H A D | dt_map.c | 73 size_t nsize = new_max * sizeof (void *); in dt_strdata_add() local 75 void **new_data = dt_zalloc(dtp, nsize); in dt_strdata_add() 121 size_t nsize = new_max * sizeof (void *); local 125 if ((new_pdesc = malloc(nsize)) == NULL || 126 (new_edesc = malloc(nsize)) == NULL) { 131 bzero(new_pdesc, nsize); 132 bzero(new_edesc, nsize); 331 size_t nsize = new_max * sizeof (void *); local 334 if ((new_aggdesc = malloc(nsize)) == NULL) 337 bzero(new_aggdesc, nsize);
|
| /freebsd-12.1/contrib/gcclibs/libiberty/ |
| H A D | hashtab.c | 428 int nsize = prime_tab[nindex].prime; in htab_empty() local 435 htab->entries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize, in htab_empty() 438 htab->entries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *)); in htab_empty() 439 htab->size = nsize; in htab_empty() 498 size_t nsize, osize, elts; in htab_expand() local 512 nsize = prime_tab[nindex].prime; in htab_expand() 517 nsize = osize; in htab_expand() 521 nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize, in htab_expand() 524 nentries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *)); in htab_expand() 528 htab->size = nsize; in htab_expand()
|
| /freebsd-12.1/contrib/binutils/libiberty/ |
| H A D | hashtab.c | 428 int nsize = prime_tab[nindex].prime; in htab_empty() local 435 htab->entries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize, in htab_empty() 438 htab->entries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *)); in htab_empty() 439 htab->size = nsize; in htab_empty() 498 size_t nsize, osize, elts; in htab_expand() local 512 nsize = prime_tab[nindex].prime; in htab_expand() 517 nsize = osize; in htab_expand() 521 nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize, in htab_expand() 524 nentries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *)); in htab_expand() 528 htab->size = nsize; in htab_expand()
|
| /freebsd-12.1/stand/common/ |
| H A D | interp_lua.c | 66 interp_lua_realloc(void *ud __unused, void *ptr, size_t osize __unused, size_t nsize) in interp_lua_realloc() argument 69 if (nsize == 0) { in interp_lua_realloc() 73 return realloc(ptr, nsize); in interp_lua_realloc()
|
| /freebsd-12.1/sys/fs/nfsclient/ |
| H A D | nfs_clbio.c | 100 u_quad_t nsize; in ncl_gbp_getblksz() local 105 nsize = np->n_size; in ncl_gbp_getblksz() 110 if ((off_t)lbn * biosize >= nsize) in ncl_gbp_getblksz() 113 bcount = nsize - (off_t)lbn * biosize; in ncl_gbp_getblksz() 475 u_quad_t nsize; in ncl_bioread() local 478 nsize = np->n_size; in ncl_bioread() 1844 np->n_size = nsize; in ncl_meta_setsize() 1847 if (nsize < tsize) { in ncl_meta_setsize() 1858 lbn = nsize / biosize; in ncl_meta_setsize() 1859 bufsize = nsize - (lbn * biosize); in ncl_meta_setsize() [all …]
|
| /freebsd-12.1/stand/i386/kgzldr/ |
| H A D | boot.c | 48 uint32_t nsize; /* encoded image size */ member 113 if ((size_t)(ip - kgz_ndata) + KGZ_TAIL > kgz.nsize) in input()
|
| /freebsd-12.1/contrib/amd/amd/ |
| H A D | map.c | 165 exported_ap_realloc_map(int nsize) in exported_ap_realloc_map() argument 170 if (nsize < 0 || nsize == exported_ap_size) in exported_ap_realloc_map() 173 exported_ap = (am_node **) xrealloc((voidp) exported_ap, nsize * sizeof(am_node *)); in exported_ap_realloc_map() 175 if (nsize > exported_ap_size) in exported_ap_realloc_map() 177 (nsize - exported_ap_size) * sizeof(am_node *)); in exported_ap_realloc_map() 178 exported_ap_size = nsize; in exported_ap_realloc_map()
|
| /freebsd-12.1/cddl/contrib/opensolaris/cmd/dtrace/ |
| H A D | dtrace.c | 1195 dtrace_optval_t nsize; local 1200 (void) dtrace_getopt(g_dtp, bufs[i].optname, &nsize); 1202 if (nsize == DTRACEOPT_UNSET || nsize == 0) 1205 if (nsize >= bufs[i].val - sizeof (uint64_t)) 1208 for (; (INT64_C(1) << mul) <= nsize; j++, mul += 10) 1211 if (!(nsize & ((INT64_C(1) << (mul - 10)) - 1))) { 1213 (long long)nsize >> (mul - 10), " kmgtpe"[j]); 1216 (long long)nsize);
|
| /freebsd-12.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ |
| H A D | zcp.c | 740 zcp_lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize) in zcp_lua_alloc() argument 746 if (nsize == 0) { in zcp_lua_alloc() 759 int64_t allocsize = nsize + sizeof (int64_t); in zcp_lua_alloc() 775 } else if (nsize <= osize) { in zcp_lua_alloc() 782 ASSERT3U(nsize, >, osize); in zcp_lua_alloc() 784 uint64_t *luabuf = zcp_lua_alloc(ud, NULL, 0, nsize); in zcp_lua_alloc()
|