/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | recallocarray.c | 32 size_t oldsize, newsize; in recallocarray() local 50 oldsize = oldnelem * elsize; in recallocarray() 56 if (newsize <= oldsize) { in recallocarray() 57 size_t d = oldsize - newsize; in recallocarray() 59 if (d < oldsize / 2 && d < getpagesize()) { in recallocarray() 69 if (newsize > oldsize) { in recallocarray() 70 (void) memcpy(newptr, ptr, oldsize); in recallocarray() 71 (void) memset((char *)newptr + oldsize, 0, newsize - oldsize); in recallocarray() 76 explicit_bzero(ptr, oldsize); in recallocarray()
|
/illumos-gate/usr/src/cmd/zic/ |
H A D | ialloc.c | 32 register int oldsize, newsize; local 36 oldsize = 0; 39 else oldsize = strlen(old); 40 if ((result = irealloc(old, oldsize + newsize + 1)) != NULL) 42 (void) strcpy(result + oldsize, new);
|
/illumos-gate/usr/src/stand/lib/sa/ |
H A D | malloc.c | 66 size_t oldsize; in realloc() local 70 oldsize = ((size_t *)oldaddr)[-1]; in realloc() 72 bcopy(oldaddr, addr, (oldsize > size ? oldsize : size)); in realloc()
|
/illumos-gate/usr/src/lib/libnisdb/ |
H A D | db_index.cc | 116 get_next_hashsize(long unsigned oldsize) in get_next_hashsize() argument 119 if (oldsize == 0) in get_next_hashsize() 123 if (oldsize == newsize) { in get_next_hashsize() 128 newsize = oldsize * 2 + 1; /* just double */ in get_next_hashsize() 142 long unsigned oldsize = table_size, i; in grow() local 154 table_size = oldsize; in grow() 165 table_size = oldsize; in grow() 172 for (i = 0; i < oldsize; i++) { in grow()
|
H A D | db_table.cc | 106 get_new_table_size(long unsigned oldsize) in get_new_table_size() argument 109 if (oldsize == 0) in get_new_table_size() 113 if (oldsize == newsize) { in get_new_table_size() 118 newsize = oldsize + DB_TABLE_GROWTH_INCREMENT; in get_new_table_size() 432 long oldsize = table_size; in grow() local 436 table_size = get_new_table_size(oldsize); in grow() 443 table_size = oldsize; in grow() 454 table_size = oldsize; in grow() 468 db_status stat = allocateExpire(oldsize, table_size); in grow() 472 table_size = oldsize; in grow() [all …]
|
H A D | db_dictionary.cc | 386 get_next_hashsize(long unsigned oldsize) in get_next_hashsize() argument 389 if (oldsize == 0) in get_next_hashsize() 393 if (oldsize == newsize) { in get_next_hashsize() 398 newsize = oldsize * 2 + 1; /* just double */ in get_next_hashsize() 412 unsigned int oldsize, i, new_size; in grow_dictionary() local 415 oldsize = dd->tables.tables_len; in grow_dictionary() 418 new_size = get_next_hashsize(oldsize); in grow_dictionary() 433 for (i = 0; i < oldsize; i++) { in grow_dictionary()
|
/illumos-gate/usr/src/uts/common/fs/tmpfs/ |
H A D | tmp_tnode.c | 233 size_t oldsize = tp->tn_size; in tmpnode_trunc() local 242 if (newsize == oldsize) { in tmpnode_trunc() 250 if (newsize > oldsize) { in tmpnode_trunc() 252 P2ROUNDUP(oldsize, PAGESIZE); in tmpnode_trunc() 272 (btopr(newsize) != btopr(oldsize)))) { in tmpnode_trunc() 282 if (btopr(newsize) != btopr(oldsize)) { in tmpnode_trunc() 284 delta = P2ROUNDUP(oldsize, PAGESIZE) - in tmpnode_trunc()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/vmalloc/ |
H A D | vmlast.c | 149 size_t oldsize = 0; local 184 oldsize = (Vmuchar_t*)seg->last - (Vmuchar_t*)data; 185 else oldsize = (Vmuchar_t*)BLOCK(seg->baddr) - (Vmuchar_t*)data; 191 oldsize = s; 193 { oldsize = (Vmuchar_t*)tp - (Vmuchar_t*)data; 225 { ds = oldsize < size ? oldsize : size; 260 if((type&VM_RSZERO) && size > oldsize) 261 memset((Void_t*)((Vmuchar_t*)data + oldsize), 0, size-oldsize);
|
H A D | vmdebug.c | 475 size_t s, oldsize; local 510 oldsize = DBSIZE(addr); 522 dbsetinfo((Vmuchar_t*)addr,oldsize,oldfile,oldline); 536 if(data && (type&VM_RSZERO) && size > oldsize) 537 { Vmuchar_t *d = data+oldsize, *ed = data+size;
|
H A D | vmprofile.c | 561 reg size_t oldsize; local 581 s = oldsize = PFSIZE(data); 610 if(addr && (type&VM_RSZERO) && oldsize < size) 611 { reg Vmuchar_t *d = (Vmuchar_t*)addr+oldsize, *ed = (Vmuchar_t*)addr+size;
|
/illumos-gate/usr/src/lib/libumem/common/ |
H A D | malloc.c | 393 size_t oldsize; in realloc() local 407 if (process_free(buf_arg, 0, &oldsize) == 0) { in realloc() 412 if (newsize == oldsize) /* size didn't change */ in realloc() 419 (void) memcpy(buf, buf_arg, MIN(newsize, oldsize)); in realloc()
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | grow.c | 320 size_t oldsize = p->p_stksize; in grow() local 338 if (err == 0 && newsize > oldsize) { in grow() 339 ASSERT(IS_P2ALIGNED(oldsize, PAGESIZE)); in grow() 346 newsize - oldsize, F_INVAL, S_WRITE); in grow() 430 size_t oldsize; in grow_internal() local 467 oldsize = p->p_stksize; in grow_internal() 468 ASSERT(P2PHASE(oldsize, PAGESIZE) == 0); in grow_internal() 470 if (newsize <= oldsize) { /* prevent the stack from shrinking */ in grow_internal() 485 caddr_t oldsp = p->p_usrstack - oldsize; in grow_internal() 527 if ((error = as_map(p->p_as, (caddr_t)new_start, newsize - oldsize, in grow_internal()
|
H A D | ipc.c | 872 int i, oldsize, newsize; in ipc_grow() local 880 oldsize = service->ipcs_tabsz; in ipc_grow() 881 newsize = oldsize << 1; in ipc_grow() 887 for (i = 0; i < oldsize; i++) { in ipc_grow() 901 for (i = 0; i < oldsize; i++) { in ipc_grow() 906 id_space_extend(service->ipcs_ids, oldsize, service->ipcs_tabsz); in ipc_grow()
|
/illumos-gate/usr/src/uts/common/fs/lofs/ |
H A D | lofs_subr.c | 520 uint_t oldsize; in lgrow() local 539 oldsize = li->li_htsize; in lgrow() 546 for (i = 0; i < oldsize; i++) in lgrow() 554 for (i = 0; i < oldsize; i++) in lgrow() 559 for (i = 0; i < oldsize; i++) { in lgrow() 591 for (i = 0; i < oldsize; i++) { in lgrow() 597 lretire(li, oldtable, oldsize); in lgrow()
|
/illumos-gate/usr/src/uts/sun4u/sunfire/io/ |
H A D | fhc_bd.c | 179 int oldsize; in fhc_check_size() local 185 oldsize = sizeof (fhc_bd_t *) * resizable->size; in fhc_check_size() 188 fhc_resize(&(resizable->boards), oldsize, newsize); in fhc_check_size() 291 fhc_resize(fhc_bd_t ***in_array, int oldsize, int newsize) in fhc_resize() argument 296 ASSERT(newsize > oldsize); in fhc_resize() 303 ASSERT(oldsize > 0); in fhc_resize() 304 bcopy(*in_array, temp, oldsize); in fhc_resize() 305 kmem_free(*in_array, oldsize); in fhc_resize()
|
/illumos-gate/usr/src/cmd/bdiff/ |
H A D | bdiff.c | 536 size_t oldsize; in readline() local 550 oldsize = *bufsizp; in readline() 555 bufp = fgets(*bufferp + oldsize -1, oldsize + 1, filep); in readline()
|
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/mech/ |
H A D | errmap.h | 96 size_t oldsize = sizeof(*arr->elts) * arr->allocated; in mecherrmap__pairarray_grow() local 111 memset((char *)ptr + oldsize, 0, newsize - oldsize); in mecherrmap__pairarray_grow()
|
/illumos-gate/usr/src/cmd/sendmail/db/lock/ |
H A D | lock_region.c | 349 size_t incr, oldsize, used, usedmem; local 355 oldsize = lrp->hdr.size; 418 incr += ALIGN(oldsize, MUTEX_ALIGNMENT) - oldsize; 424 if ((ret = __db_rgrow(<->reginfo, oldsize + incr)) != 0) 436 curaddr = (u_int8_t *)lrp + oldsize;
|
/illumos-gate/usr/src/uts/common/fs/portfs/ |
H A D | port_fd.c | 558 int oldsize; in port_cache_grow_hashtbl() local 562 oldsize = pcp->pc_hashsize; in port_cache_grow_hashtbl() 571 for (i = 0; i < oldsize; i++) { in port_cache_grow_hashtbl() 580 kmem_free(oldtbl, oldsize * sizeof (portfd_t *)); in port_cache_grow_hashtbl()
|
/illumos-gate/usr/src/cmd/file/ |
H A D | magicutils.c | 230 size_t oldsize; in f_mkmtab() local 273 oldsize = mend - mtab; in f_mkmtab() 274 tbsize = (NENT + oldsize) * sizeof (Entry); in f_mkmtab() 281 (void) memset(mtab + oldsize, 0, in f_mkmtab() 284 ep = &mtab[oldsize-1]; in f_mkmtab()
|
/illumos-gate/usr/src/lib/libkmf/libkmf/common/ |
H A D | generalop.c | 2075 size_t oldsize; in GetSequenceContents() local 2099 if (kmfber_scanf(exasn1, "tl{", &tag, &oldsize) == KMFBER_DEFAULT || in GetSequenceContents() 2100 oldsize == 0) { in GetSequenceContents() 2105 olddata = malloc(oldsize); in GetSequenceContents() 2110 (void) memset(olddata, 0, oldsize); in GetSequenceContents() 2115 if (kmfber_read(exasn1, olddata, oldsize) != oldsize) { in GetSequenceContents() 2130 *outlen = oldsize; in GetSequenceContents() 2176 size_t oldsize = 0; in kmf_set_altname() local 2200 &olddata, &oldsize); in kmf_set_altname() 2217 if (olddata != NULL && oldsize > 0) { in kmf_set_altname() [all …]
|
H A D | csrcrlop.c | 266 size_t oldsize = 0; in kmf_add_csr_eku() local 279 foundextn->BERvalue.Length, &olddata, &oldsize); in kmf_add_csr_eku() 302 if (olddata != NULL && oldsize > 0) { in kmf_add_csr_eku() 303 if (kmfber_write(asn1, olddata, oldsize, 0) == -1) { in kmf_add_csr_eku()
|
/illumos-gate/usr/src/uts/common/fs/ |
H A D | dnlc.c | 1886 uint_t oldsize; in dnlc_dir_adjust_nhash() local 1906 oldsize = dcp->dc_nhash_mask + 1; in dnlc_dir_adjust_nhash() 1912 for (i = 0; i < oldsize; i++) { /* for each hash bucket */ in dnlc_dir_adjust_nhash() 1926 kmem_free(dcp->dc_namehash, sizeof (dcentry_t *) * oldsize); in dnlc_dir_adjust_nhash() 1938 uint_t oldsize; in dnlc_dir_adjust_fhash() local 1957 oldsize = dcp->dc_fhash_mask + 1; in dnlc_dir_adjust_fhash() 1963 for (i = 0; i < oldsize; i++) { /* for each hash bucket */ in dnlc_dir_adjust_fhash() 1977 kmem_free(dcp->dc_freehash, sizeof (dcfree_t *) * oldsize); in dnlc_dir_adjust_fhash()
|
/illumos-gate/usr/src/uts/common/fs/zfs/lua/ |
H A D | lmem.h | 50 LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
|
H A D | lparser.c | 167 int oldsize = f->sizelocvars; in registerlocalvar() local 170 while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL; in registerlocalvar() 232 int oldsize = f->sizeupvalues; in newupvalue() local 236 while (oldsize < f->sizeupvalues) f->upvalues[oldsize++].name = NULL; in newupvalue() 503 int oldsize = f->sizep; in addprototype() local 505 while (oldsize < f->sizep) f->p[oldsize++] = NULL; in addprototype()
|