/freebsd/sys/vm/ |
H A D | redzone.c | 77 u_long nsize; in redzone_get_size() local 79 bcopy(naddr - REDZONE_CHSIZE - sizeof(u_long), &nsize, sizeof(nsize)); in redzone_get_size() 80 return (nsize); in redzone_get_size() 84 redzone_size_ntor(u_long nsize) in redzone_size_ntor() argument 87 return (nsize + redzone_roundup(nsize) + REDZONE_FSIZE); in redzone_size_ntor() 101 redzone_setup(caddr_t raddr, u_long nsize) in redzone_setup() argument 106 atomic_add_long(&redzone_extra_mem, redzone_size_ntor(nsize) - nsize); in redzone_setup() 108 haddr = raddr + redzone_roundup(nsize) - REDZONE_HSIZE; in redzone_setup() 109 faddr = haddr + REDZONE_HSIZE + nsize; in redzone_setup() 115 bcopy(&nsize, haddr, sizeof(nsize)); in redzone_setup() [all …]
|
H A D | redzone.h | 33 u_long redzone_size_ntor(u_long nsize); 35 void *redzone_setup(caddr_t raddr, u_long nsize);
|
H A D | vm_unix.c | 64 char *nsize; member 74 addr = (uintptr_t)uap->nsize; in sys_break()
|
H A D | vnode_pager.c | 497 vnode_pager_setsize(struct vnode *vp, vm_ooffset_t nsize) in vnode_pager_setsize() argument 522 if (nsize == object->un_pager.vnp.vnp_size) { in vnode_pager_setsize() 529 nobjsize = OFF_TO_IDX(nsize + PAGE_MASK); in vnode_pager_setsize() 530 if (nsize < object->un_pager.vnp.vnp_size) { in vnode_pager_setsize() 545 if (!(nsize & PAGE_MASK)) in vnode_pager_setsize() 547 m = vm_page_grab(object, OFF_TO_IDX(nsize), VM_ALLOC_NOCREAT); in vnode_pager_setsize() 551 vnode_pager_subpage_purge(m, (int)nsize & PAGE_MASK, in vnode_pager_setsize() 557 object->un_pager.vnp.vnp_size = nsize; in vnode_pager_setsize() 559 atomic_store_64(&object->un_pager.vnp.vnp_size, nsize); in vnode_pager_setsize()
|
/freebsd/usr.bin/indent/ |
H A D | indent_globs.h | 54 int nsize = l_code-s_code + 400 + desired_size; \ 56 codebuf = (char *) realloc(codebuf, nsize); \ 60 l_code = codebuf + nsize - 5; \ 65 int nsize = l_com-s_com + 400 + desired_size; \ 72 combuf = (char *) realloc(combuf, nsize); \ 78 l_com = combuf + nsize - 5; \ 83 int nsize = l_lab-s_lab + 400 + desired_size; \ 85 labbuf = (char *) realloc(labbuf, nsize); \ 89 l_lab = labbuf + nsize - 5; \ 94 int nsize = l_token-s_token + 400 + desired_size; \ [all …]
|
/freebsd/sys/contrib/openzfs/module/lua/ |
H A D | lmem.c | 73 void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { in luaM_realloc_() argument 79 if (nsize > realosize && g->gcrunning) in luaM_realloc_() 82 newblock = (*g->frealloc)(g->ud, block, osize, nsize); in luaM_realloc_() 83 if (newblock == NULL && nsize > 0) { in luaM_realloc_() 84 api_check(L, nsize > realosize, in luaM_realloc_() 88 newblock = (*g->frealloc)(g->ud, block, osize, nsize); /* try again */ in luaM_realloc_() 93 lua_assert((nsize == 0) == (newblock == NULL)); in luaM_realloc_() 94 g->GCdebt = (g->GCdebt + nsize) - realosize; in luaM_realloc_()
|
/freebsd/contrib/openpam/lib/libpam/ |
H A D | pam_set_item.c | 62 size_t nsize, osize; in pam_set_item() local 66 osize = nsize = 0; in pam_set_item() 86 nsize = strlen(item) + 1; in pam_set_item() 89 osize = nsize = sizeof(struct pam_repository); in pam_set_item() 92 osize = nsize = sizeof(struct pam_conv); in pam_set_item() 102 if ((*slot = malloc(nsize)) == NULL) in pam_set_item() 104 memcpy(*slot, item, nsize); in pam_set_item()
|
/freebsd/contrib/lua/src/ |
H A D | lmem.c | 163 size_t osize, size_t nsize) { in tryagain() argument 167 return callfrealloc(g, block, osize, nsize); /* try again */ in tryagain() 176 void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) { in luaM_realloc_() argument 180 newblock = firsttry(g, block, osize, nsize); in luaM_realloc_() 181 if (l_unlikely(newblock == NULL && nsize > 0)) { in luaM_realloc_() 182 newblock = tryagain(L, block, osize, nsize); in luaM_realloc_() 186 lua_assert((nsize == 0) == (newblock == NULL)); in luaM_realloc_() 187 g->GCdebt = (g->GCdebt + nsize) - osize; in luaM_realloc_() 193 size_t nsize) { in luaM_saferealloc_() argument 194 void *newblock = luaM_realloc_(L, block, osize, nsize); in luaM_saferealloc_() [all …]
|
H A D | lstring.c | 62 static void tablerehash (TString **vect, int osize, int nsize) { in tablerehash() argument 64 for (i = osize; i < nsize; i++) /* clear new elements */ in tablerehash() 71 unsigned int h = lmod(p->hash, nsize); /* new position */ in tablerehash() 85 void luaS_resize (lua_State *L, int nsize) { in luaS_resize() argument 89 if (nsize < osize) /* shrinking table? */ in luaS_resize() 90 tablerehash(tb->hash, osize, nsize); /* depopulate shrinking part */ in luaS_resize() 91 newvect = luaM_reallocvector(L, tb->hash, osize, nsize, TString*); in luaS_resize() 93 if (nsize < osize) /* was it shrinking table? */ in luaS_resize() 94 tablerehash(tb->hash, nsize, osize); /* restore to original size */ in luaS_resize() 99 tb->size = nsize; in luaS_resize() [all …]
|
H A D | loadlib.c | 180 DWORD nsize = sizeof(buff)/sizeof(char); in setprogdir() local 181 DWORD n = GetModuleFileNameA(NULL, buff, nsize); /* get exec. name */ in setprogdir() 182 if (n == 0 || n == nsize || (lb = strrchr(buff, '\\')) == NULL) in setprogdir()
|
/freebsd/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/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/tests/sys/fs/fusefs/ |
H A D | cache.cc | 150 ssize_t nsize = get<3>(GetParam()); in TEST_P() local 153 ASSERT_LE(nsize, bufsize); in TEST_P() 182 expect_lookup(RELPATH, ino, nsize, entry_valid, attr_valid); in TEST_P() 189 expect_getattr(ino, 1, nsize, attr_valid); in TEST_P() 190 expect_read(ino, 0, nsize, nsize, CONTENTS); in TEST_P() 192 ASSERT_EQ(nsize, read(fd, buf, bufsize)) << strerror(errno); in TEST_P() 193 ASSERT_EQ(0, memcmp(buf, CONTENTS, nsize)); in TEST_P()
|
/freebsd/usr.sbin/makefs/ffs/ |
H A D | ffs_balloc.c | 86 int osize, nsize, num, i, error; in ffs_balloc_ufs1() local 150 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 151 if (nsize <= osize) { in ffs_balloc_ufs1() 180 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 182 nsize = fs->fs_bsize; in ffs_balloc_ufs1() 186 nsize, &newb); in ffs_balloc_ufs1() 190 bp = getblk((void *)ip->i_devvp, lbn, nsize, in ffs_balloc_ufs1() 343 int osize, nsize, num, i, error; in ffs_balloc_ufs2() local 407 nsize = fragroundup(fs, size); in ffs_balloc_ufs2() 408 if (nsize <= osize) { in ffs_balloc_ufs2() [all …]
|
/freebsd/sys/ufs/ffs/ |
H A D | ffs_balloc.c | 101 int deallocated, osize, nsize, num, i, error; in ffs_balloc_ufs1() local 195 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 196 if (nsize <= osize) { in ffs_balloc_ufs1() 205 &dp->di_db[0]), osize, nsize, flags, in ffs_balloc_ufs1() 212 nsize, osize, bp); in ffs_balloc_ufs1() 216 nsize = fragroundup(fs, size); in ffs_balloc_ufs1() 218 nsize = fs->fs_bsize; in ffs_balloc_ufs1() 222 nsize, flags, cred, &newb); in ffs_balloc_ufs1() 225 bp = getblk(vp, lbn, nsize, 0, 0, gbflags); in ffs_balloc_ufs1() 231 nsize, 0, bp); in ffs_balloc_ufs1() [all …]
|
H A D | ffs_alloc.c | 256 int nsize, in ffs_realloccg() argument 284 (uint64_t)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) { in ffs_realloccg() 288 nsize, fs->fs_fsmnt); in ffs_realloccg() 297 freespace(fs, fs->fs_minfree) - numfrags(fs, nsize - osize) < 0) { in ffs_realloccg() 322 error = chkdq(ip, btodb(nsize - osize), cred, 0); in ffs_realloccg() 334 bno = ffs_fragextend(ip, cg, bprev, osize, nsize); in ffs_realloccg() 338 delta = btodb(nsize - osize); in ffs_realloccg() 344 allocbuf(bp, nsize); in ffs_realloccg() 346 vfs_bio_bzero_buf(bp, osize, nsize - osize); in ffs_realloccg() 348 vfs_bio_set_valid(bp, osize, nsize - osize); in ffs_realloccg() [all …]
|
/freebsd/usr.sbin/makefs/msdos/ |
H A D | msdosfs_vnops.c | 437 size_t nsize, offs; in msdosfs_wfile() local 454 nsize = st->st_size; in msdosfs_wfile() 455 MSDOSFS_DPRINTF(("%s(nsize=%zu, osize=%zu)\n", __func__, nsize, osize)); in msdosfs_wfile() 456 if (nsize > osize) { in msdosfs_wfile() 457 if ((error = deextend(dep, nsize, NULL)) != 0) in msdosfs_wfile() 469 if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) in msdosfs_wfile() 479 for (offs = 0; offs < nsize;) { in msdosfs_wfile() 497 cpsize = MIN((nsize - offs), blsize - on); in msdosfs_wfile() 503 munmap(dat, nsize); in msdosfs_wfile() 506 munmap(dat, nsize); in msdosfs_wfile()
|
/freebsd/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/contrib/lib9p/ |
H A D | rfuncs.c | 236 size_t nsize; in r_pgexpand() local 238 nsize = pg->r_pgbufsize << 1; in r_pgexpand() 239 if (nsize >= (1 << 20) || in r_pgexpand() 240 (pg->r_pgbuf = realloc(pg->r_pgbuf, nsize)) == NULL) in r_pgexpand()
|
/freebsd/stand/common/ |
H A D | interp_lua.c | 65 interp_lua_realloc(void *ud __unused, void *ptr, size_t osize __unused, size_t nsize) in interp_lua_realloc() argument 68 if (nsize == 0) { in interp_lua_realloc() 72 return realloc(ptr, nsize); in interp_lua_realloc()
|
/freebsd/sys/fs/nfsclient/ |
H A D | nfs_clbio.c | 95 u_quad_t nsize; in ncl_gbp_getblksz() local 100 nsize = np->n_size; in ncl_gbp_getblksz() 105 if ((off_t)lbn * biosize >= nsize) in ncl_gbp_getblksz() 107 else if ((off_t)(lbn + 1) * biosize > nsize) in ncl_gbp_getblksz() 108 bcount = nsize - (off_t)lbn * biosize; in ncl_gbp_getblksz() 483 u_quad_t nsize; in ncl_bioread() local 486 nsize = np->n_size; in ncl_bioread() 503 (off_t)(lbn + 1 + nra) * biosize < nsize; nra++) { in ncl_bioread() 533 if ((off_t)lbn * biosize >= nsize) { in ncl_bioread() 535 } else if ((off_t)(lbn + 1) * biosize > nsize) { in ncl_bioread() 1774 ncl_meta_setsize(struct vnode * vp,struct thread * td,u_quad_t nsize) ncl_meta_setsize() argument [all...] |
H A D | nfs_clsubs.c | 185 u_quad_t nsize; in ncl_getattrcache() local 243 setnsize = ncl_pager_setsize(vp, &nsize); in ncl_getattrcache() 257 vnode_pager_setsize(vp, nsize); in ncl_getattrcache()
|
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/ |
H A D | dtrace.c | 1207 dtrace_optval_t nsize; local 1212 (void) dtrace_getopt(g_dtp, bufs[i].optname, &nsize); 1214 if (nsize == DTRACEOPT_UNSET || nsize == 0) 1217 if (nsize >= bufs[i].val - sizeof (uint64_t)) 1220 for (; (INT64_C(1) << mul) <= nsize; j++, mul += 10) 1223 if (!(nsize & ((INT64_C(1) << (mul - 10)) - 1))) { 1225 (long long)nsize >> (mul - 10), " kmgtpe"[j]); 1228 (long long)nsize);
|
/freebsd/lib/libc/sys/ |
H A D | brk.c | 34 void *__sys_break(char *nsize);
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | zcp.c | 723 zcp_lua_alloc(void *ud, void *ptr, size_t osize, size_t nsize) in zcp_lua_alloc() argument 727 if (nsize == 0) { in zcp_lua_alloc() 740 int64_t allocsize = nsize + sizeof (int64_t); in zcp_lua_alloc() 753 } else if (nsize <= osize) { in zcp_lua_alloc() 760 ASSERT3U(nsize, >, osize); in zcp_lua_alloc() 762 uint64_t *luabuf = zcp_lua_alloc(ud, NULL, 0, nsize); in zcp_lua_alloc()
|