Home
last modified time | relevance | path

Searched refs:newsize (Results 1 – 25 of 88) sorted by relevance

1234

/illumos-gate/usr/src/uts/common/fs/tmpfs/
H A Dtmp_tnode.c131 tmpnode_growmap(struct tmpnode *tp, ulong_t newsize) in tmpnode_growmap() argument
133 pgcnt_t np = btopr(newsize); in tmpnode_growmap()
142 if (newsize > MAXOFF_T) in tmpnode_growmap()
231 ulong_t newsize) in tmpnode_trunc() argument
242 if (newsize == oldsize) { in tmpnode_trunc()
250 if (newsize > oldsize) { in tmpnode_trunc()
251 delta = P2ROUNDUP(newsize, PAGESIZE) - in tmpnode_trunc()
272 (btopr(newsize) != btopr(oldsize)))) { in tmpnode_trunc()
276 tmpnode_growmap(tp, newsize); in tmpnode_trunc()
277 tp->tn_size = newsize; in tmpnode_trunc()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Drecallocarray.c32 size_t oldsize, newsize; in recallocarray() local
43 newsize = newnelem * elsize; in recallocarray()
56 if (newsize <= oldsize) { in recallocarray()
57 size_t d = oldsize - newsize; in recallocarray()
60 (void) memset((char *)ptr + newsize, 0, d); in recallocarray()
65 newptr = malloc(newsize); in recallocarray()
69 if (newsize > oldsize) { in recallocarray()
71 (void) memset((char *)newptr + oldsize, 0, newsize - oldsize); in recallocarray()
73 (void) memcpy(newptr, ptr, newsize); in recallocarray()
/illumos-gate/usr/src/uts/common/fs/zfs/lua/
H A Dlmem.c49 int newsize; in luaM_growaux_() local
53 newsize = limit; /* still have at least one free place */ in luaM_growaux_()
56 newsize = (*size)*2; in luaM_growaux_()
57 if (newsize < MINSIZEARRAY) in luaM_growaux_()
58 newsize = MINSIZEARRAY; /* minimum size */ in luaM_growaux_()
60 newblock = luaM_reallocv(L, block, *size, newsize, size_elems); in luaM_growaux_()
61 *size = newsize; /* update only when everything else is OK */ in luaM_growaux_()
H A Dlstring.c64 void luaS_resize (lua_State *L, int newsize) { in luaS_resize() argument
69 if (newsize > tb->size) { in luaS_resize()
70 luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *); in luaS_resize()
71 for (i = tb->size; i < newsize; i++) tb->hash[i] = NULL; in luaS_resize()
79 unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */ in luaS_resize()
86 if (newsize < tb->size) { in luaS_resize()
88 lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL); in luaS_resize()
89 luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *); in luaS_resize()
91 tb->size = newsize; in luaS_resize()
H A Dldo.c165 void luaD_reallocstack (lua_State *L, int newsize) { in luaD_reallocstack() argument
168 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE); in luaD_reallocstack()
170 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue); in luaD_reallocstack()
171 for (; lim < newsize; lim++) in luaD_reallocstack()
173 L->stacksize = newsize; in luaD_reallocstack()
174 L->stack_last = L->stack + newsize - EXTRA_STACK; in luaD_reallocstack()
185 int newsize = 2 * size; in luaD_growstack() local
186 if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK; in luaD_growstack()
187 if (newsize < needed) newsize = needed; in luaD_growstack()
188 if (newsize > LUAI_MAXSTACK) { /* stack overflow? */ in luaD_growstack()
[all …]
/illumos-gate/usr/src/cmd/growfs/
H A Dgrowfs.sh40 newsize=0
107 while [ "$newsize" -lt "$size" ]; do
112 newsize=`$cmd`; retv=$?
113 if [ 0 -ne $retv -o -z "$newsize" ]; then
117 if [ 0 -eq "$newsize" ]; then
122 cmd="$UFS_MKFS $mkfs_opts $mkfs_subopts $raw_special $newsize"; retv=$?
128 echo "$myname: cannot grow file system to $newsize sectors"
/illumos-gate/usr/src/cmd/fs.d/
H A Dpreenlib.c376 uint_t newsize; in addunit() local
378 newsize = howmany(unit+1, WORDSIZE); in addunit()
379 if (devp->mapsize < newsize) { in addunit()
382 newsize * sizeof (uint_t)) : in addunit()
383 (uint_t *)malloc(newsize * sizeof (uint_t)); in addunit()
389 (uint_t)((newsize - devp->mapsize) * sizeof (uint_t))); in addunit()
390 devp->mapsize = newsize; in addunit()
416 int newsize = dev->mapsize; in makebusy() local
419 if (drvp->mapsize < newsize) { in makebusy()
422 newsize * sizeof (uint_t)) : in makebusy()
[all …]
/illumos-gate/usr/src/lib/libtsol/common/
H A Dbtos.c334 int newsize; in sbsltos() local
336 if ((newsize = alloc_string(&sstring, ssize, in sbsltos()
341 ssize += newsize; in sbsltos()
368 int newsize; in sbsltos() local
371 if ((newsize = alloc_string(&sstring, ssize, 's')) == in sbsltos()
376 ssize += newsize; in sbsltos()
430 int newsize; in sbcleartos() local
432 if ((newsize = alloc_string(&sstring, ssize, in sbcleartos()
437 ssize += newsize; in sbcleartos()
464 int newsize; in sbcleartos() local
[all …]
/illumos-gate/usr/src/tools/smatch/src/cwchash/
H A Dhashtable.c77 unsigned int newsize, i, index; in hashtable_expand() local
80 newsize = primes[++(h->primeindex)]; in hashtable_expand()
82 newtable = (struct entry **)malloc(sizeof(struct entry*) * newsize); in hashtable_expand()
85 memset(newtable, 0, newsize * sizeof(struct entry *)); in hashtable_expand()
91 index = indexFor(newsize,e->h); in hashtable_expand()
103 realloc(h->table, newsize * sizeof(struct entry *)); in hashtable_expand()
106 memset(newtable[h->tablelength], 0, newsize - h->tablelength); in hashtable_expand()
109 index = indexFor(newsize,e->h); in hashtable_expand()
123 h->tablelength = newsize; in hashtable_expand()
124 h->loadlimit = (unsigned int) ceil(newsize * max_load_factor); in hashtable_expand()
/illumos-gate/usr/src/cmd/zic/
H A Dialloc.c32 register int oldsize, newsize; local
34 newsize = (new == NULL) ? 0 : strlen(new);
37 else if (newsize == 0)
40 if ((result = irealloc(old, oldsize + newsize + 1)) != NULL)
/illumos-gate/usr/src/cmd/svc/svcs/
H A Dsvcs.c1001 size_t newsize = (*buf ? strlen(*buf) : 0) + CTID_COLUMN_BUFSIZE; in sprint_ctid() local
1002 char *newbuf = safe_malloc(newsize); in sprint_ctid()
1023 (void) snprintf(newbuf, newsize, "%s%*lu ", in sprint_ctid()
1026 (void) snprintf(newbuf, newsize, "%s%*lu* ", in sprint_ctid()
1029 (void) snprintf(newbuf, newsize, "%s%*s ", in sprint_ctid()
1085 size_t newsize; in sprint_desc() local
1112 newsize = (*buf ? strlen(*buf) : 0) + in sprint_desc()
1115 newsize = (*buf ? strlen(*buf) : 0) + DESC_COLUMN_WIDTH + 1; in sprint_desc()
1116 newbuf = safe_malloc(newsize); in sprint_desc()
1117 (void) snprintf(newbuf, newsize, "%s%-*s ", *buf ? *buf : "", in sprint_desc()
[all …]
/illumos-gate/usr/src/lib/libnisdb/
H A Ddb_index.cc118 long unsigned newsize = 0, n; in get_next_hashsize() local
120 newsize = hashsizes[0]; in get_next_hashsize()
122 for (n = 0; newsize = hashsizes[n++]; ) in get_next_hashsize()
123 if (oldsize == newsize) { in get_next_hashsize()
124 newsize = hashsizes[n]; /* get next size */ in get_next_hashsize()
127 if (newsize == 0) in get_next_hashsize()
128 newsize = oldsize * 2 + 1; /* just double */ in get_next_hashsize()
130 return (newsize); in get_next_hashsize()
/illumos-gate/usr/src/uts/common/os/
H A Dgrow.c321 size_t newsize; in grow() local
335 newsize = p->p_stksize; in grow()
338 if (err == 0 && newsize > oldsize) { in grow()
340 ASSERT(IS_P2ALIGNED(newsize, PAGESIZE)); in grow()
345 (void) as_fault(as->a_hat, as, p->p_usrstack - newsize, in grow()
346 newsize - oldsize, F_INVAL, S_WRITE); in grow()
361 size_t len, newsize; in grow_lpg() local
367 newsize = p->p_usrstack - sp; in grow_lpg()
370 pgsz = map_pgsz(MAPPGSZ_STK, p, sp, newsize, 0); in grow_lpg()
429 size_t newsize; in grow_internal() local
[all …]
/illumos-gate/usr/src/lib/libdemangle/common/
H A Dcxx_util.c98 size_t newsize = roundup(newlen, CHUNK_SIZE); in name_reserve() local
99 if (newsize > cpp_name_max_depth) in name_reserve()
100 newsize = cpp_name_max_depth; in name_reserve()
103 n->nm_size * sizeof (str_pair_t), newsize * sizeof (str_pair_t)); in name_reserve()
109 n->nm_size = newsize; in name_reserve()
395 size_t newsize = roundup(sub->sub_size + amt, CHUNK_SIZE); in sub_reserve() local
397 sub->sub_size * sizeof (name_t), newsize * sizeof (name_t)); in sub_reserve()
403 sub->sub_size = newsize; in sub_reserve()
492 size_t newsize = tpl->tpl_size + CHUNK_SIZE; in templ_reserve() local
494 tpl->tpl_size * sizeof (sub_t), newsize * sizeof (sub_t)); in templ_reserve()
[all …]
H A Dstr.c109 size_t newsize = roundup(newlen, STR_CHUNK_SZ); in str_reserve() local
113 temp = zalloc(s->str_ops, newsize); in str_reserve()
119 temp = xrealloc(s->str_ops, s->str_s, s->str_size, newsize); in str_reserve()
125 s->str_size = newsize; in str_reserve()
/illumos-gate/usr/src/lib/lib9p/common/
H A Dlib9p_impl.h64 l9p_realloc(void *ptr, size_t newsize) in l9p_realloc() argument
66 void *r = realloc(ptr, newsize); in l9p_realloc()
70 newsize); in l9p_realloc()
/illumos-gate/usr/src/cmd/backup/lib/
H A Dmemutils.c68 xrealloc(allocated, newsize) in xrealloc() argument
70 size_t newsize;
75 cp = realloc(allocated, newsize);
/illumos-gate/usr/src/lib/pkcs11/libpkcs11/common/
H A Dpkcs11Slottable.c88 ulong_t newsize; in pkcs11_slottable_increase() local
93 newsize = slottable->st_last + increment + 1; in pkcs11_slottable_increase()
96 if (slottable->st_cur_size >= newsize) { in pkcs11_slottable_increase()
102 (slottable->st_slots, newsize * sizeof (pkcs11_slot_t *)); in pkcs11_slottable_increase()
110 slottable->st_cur_size = newsize; in pkcs11_slottable_increase()
/illumos-gate/usr/src/lib/smbsrv/libmlsvc/common/
H A Dsvcctl_scm.c318 size_t newsize; in svcctl_scm_get_svcdesc() local
340 newsize = strlen(desc_buf) + 1; in svcctl_scm_get_svcdesc()
341 if ((newbuf = malloc(newsize)) == NULL) { in svcctl_scm_get_svcdesc()
346 (void) snprintf(newbuf, newsize, "%s", desc_buf); in svcctl_scm_get_svcdesc()
362 size_t newsize; in svcctl_scm_get_svcfmri() local
392 newsize = strlen(fmri_buf) + 1; in svcctl_scm_get_svcfmri()
393 if ((newbuf = malloc(newsize)) == NULL) { in svcctl_scm_get_svcfmri()
398 (void) snprintf(newbuf, newsize, "%s", fmri_buf); in svcctl_scm_get_svcfmri()
415 size_t newsize; in svcctl_scm_get_svcname() local
420 newsize = strlen(fmri); in svcctl_scm_get_svcname()
[all …]
/illumos-gate/usr/src/lib/libumem/common/
H A Dmalloc.c391 realloc(void *buf_arg, size_t newsize) in realloc() argument
397 return (malloc(newsize)); in realloc()
399 if (newsize == 0) { in realloc()
412 if (newsize == oldsize) /* size didn't change */ in realloc()
415 buf = malloc(newsize); in realloc()
419 (void) memcpy(buf, buf_arg, MIN(newsize, oldsize)); in realloc()
/illumos-gate/usr/src/lib/libc/port/stdio/
H A Dopen_wmemstream.c58 size_t newsize; in open_wmemstream_write() local
71 &newsize); in open_wmemstream_write()
77 newsize, sizeof (wchar_t)); in open_wmemstream_write()
82 wmemp->wmstr_alloc = newsize; in open_wmemstream_write()
H A Dopen_memstream.c128 size_t newsize; in open_memstream_write() local
137 &newsize); in open_memstream_write()
143 newsize, sizeof (char)); in open_memstream_write()
148 memp->mstr_alloc = newsize; in open_memstream_write()
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/in.ripngd/
H A Dinput.c131 int newsize; in rip_input() local
184 newsize = 0; in rip_input()
246 newsize += sizeof (struct netinfo6); in rip_input()
257 if (answer && newsize > 0) { in rip_input()
264 newsize += sizeof (msg->rip6_cmd) + in rip_input()
266 sendpacket(from, ifp, newsize, 0); in rip_input()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/
H A Dgic_opt.c297 size_t newsize; in add_gic_opt_ext_preauth_data() local
301 newsize = opte->opt_private->num_preauth_data + 1; in add_gic_opt_ext_preauth_data()
302 newsize = newsize * sizeof(*opte->opt_private->preauth_data); in add_gic_opt_ext_preauth_data()
304 newpad = malloc(newsize); in add_gic_opt_ext_preauth_data()
306 newpad = realloc(opte->opt_private->preauth_data, newsize); in add_gic_opt_ext_preauth_data()
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/
H A Derrmap.h97 size_t newsize; in mecherrmap__pairarray_grow() local
107 newsize = sizeof(*arr->elts) * newcount; in mecherrmap__pairarray_grow()
108 ptr = realloc(arr->elts, newsize); in mecherrmap__pairarray_grow()
111 memset((char *)ptr + oldsize, 0, newsize - oldsize); in mecherrmap__pairarray_grow()

1234