Home
last modified time | relevance | path

Searched refs:newsz (Results 1 – 21 of 21) sorted by relevance

/freebsd/contrib/ntp/libntp/
H A Demalloc.c25 size_t newsz, in ereallocz() argument
38 if (0 == newsz) in ereallocz()
41 allocsz = newsz; in ereallocz()
48 (u_long)newsz); in ereallocz()
52 file, line, (u_long)newsz); in ereallocz()
57 if (zero_init && newsz > priorsz) in ereallocz()
58 zero_mem(mem + priorsz, newsz - priorsz); in ereallocz()
144 emalloc(size_t newsz)
146 return ereallocz(NULL, newsz, 0, FALSE);
/freebsd/usr.bin/mkimg/
H A Dvhd.c161 uint64_t newsz; in vhd_resize() local
173 newsz = origsz; in vhd_resize()
175 vhd_geometry(newsz, &geom); in vhd_resize()
176 newsz = (int64_t)geom.cylinders * geom.heads * in vhd_resize()
178 if (newsz >= origsz) in vhd_resize()
180 newsz += geom.heads * geom.sectors * VHD_SECTOR_SIZE; in vhd_resize()
182 return (newsz); in vhd_resize()
H A Dimage.c153 size_t dsz, newsz; in image_chunk_grow() local
155 newsz = ch->ch_size + sz; in image_chunk_grow()
156 if (newsz > ch->ch_size) { in image_chunk_grow()
157 ch->ch_size = newsz; in image_chunk_grow()
/freebsd/contrib/libedit/
H A Dchared.c485 size_t sz, newsz; in ch_enlargebufs() local
489 newsz = sz * 2; in ch_enlargebufs()
495 while(newsz - sz < addlen) in ch_enlargebufs()
496 newsz *= 2; in ch_enlargebufs()
502 newbuffer = el_realloc(el->el_line.buffer, newsz * sizeof(*newbuffer)); in ch_enlargebufs()
507 (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); in ch_enlargebufs()
520 newbuffer = el_realloc(el->el_chared.c_kill.buf, newsz * in ch_enlargebufs()
526 (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); in ch_enlargebufs()
540 newsz * sizeof(*newbuffer)); in ch_enlargebufs()
545 (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); in ch_enlargebufs()
[all …]
H A Dhist.c226 hist_enlargebuf(EditLine *el, size_t oldsz, size_t newsz) in hist_enlargebuf() argument
230 newbuf = el_realloc(el->el_history.buf, newsz * sizeof(*newbuf)); in hist_enlargebuf()
234 (void) memset(&newbuf[oldsz], '\0', (newsz - oldsz) * sizeof(*newbuf)); in hist_enlargebuf()
239 el->el_history.sz = newsz; in hist_enlargebuf()
/freebsd/contrib/flex/src/
H A Dtables.c464 size_t newsz; in yytbl_data_compress() local
472 newsz = min_int_size (tbl); in yytbl_data_compress()
475 if (newsz == YYTDFLAGS2BYTES (tbl->td_flags)) in yytbl_data_compress()
479 if (newsz > YYTDFLAGS2BYTES (tbl->td_flags)) { in yytbl_data_compress()
485 newtbl.td_data = calloc ((size_t) total_len, newsz); in yytbl_data_compress()
487 (TFLAGS_CLRDATA (newtbl.td_flags) | BYTES2TFLAG (newsz)); in yytbl_data_compress()
/freebsd/contrib/ntp/include/
H A Dntp_malloc.h47 # define EREALLOC_IMPL(ptr, newsz, filenm, loc) \ argument
48 realloc(ptr, (newsz))
/freebsd/usr.bin/diff3/
H A Ddiff3.c895 size_t newsz, incr; in increase() local
898 newsz = szchanges == 0 ? 64 : 2 * szchanges; in increase()
899 incr = newsz - szchanges; in increase()
901 p = reallocarray(d13, newsz, sizeof(*p)); in increase()
906 p = reallocarray(d23, newsz, sizeof(*p)); in increase()
911 p = reallocarray(de, newsz, sizeof(*p)); in increase()
916 q = reallocarray(overlap, newsz, 1); in increase()
921 szchanges = newsz; in increase()
/freebsd/contrib/dma/
H A Ddns.c102 size_t newsz = roundup(*ps + 2, count_inc); in add_host() local
103 *he = reallocf(*he, newsz * sizeof(**he)); in add_host()
/freebsd/contrib/bmake/
H A Dmeta.c884 size_t newsz; in fgetLine() local
887 newsz = ROUNDUP(((size_t)fs.st_size / 2), BUFSIZ); in fgetLine()
888 if (newsz <= bufsz) in fgetLine()
889 newsz = ROUNDUP((size_t)fs.st_size, BUFSIZ); in fgetLine()
890 if (newsz <= bufsz) in fgetLine()
893 (unsigned)bufsz, (unsigned)newsz); in fgetLine()
894 p = bmake_realloc(buf, newsz); in fgetLine()
896 *szp = bufsz = newsz; in fgetLine()
/freebsd/contrib/mandoc/
H A Droff.c3551 size_t oldsz, newsz, valsz; in roff_als() local
3557 newsz = roff_getname(r, &oldn, ln, pos); in roff_als()
3558 if (newn[newsz] == '\\' || newn[newsz] == '\t' || *oldn == '\0') in roff_als()
3568 roff_setstrn(&r->strtab, newn, newsz, value, valsz, 0); in roff_als()
3569 roff_setstrn(&r->rentab, newn, newsz, NULL, 0, 0); in roff_als()
3832 size_t oldsz, newsz; in roff_rn() local
3844 newsz = roff_getname(r, &end, ln, newn - buf->buf); in roff_rn()
3845 if (newsz == 0) in roff_rn()
3852 roff_setstrn(&r->strtab, newn, newsz, value, strlen(value), 0); in roff_rn()
3854 roff_setstrn(&r->rentab, newn, newsz, NULL, 0, 0); in roff_rn()
[all …]
/freebsd/contrib/libder/libder/
H A Dlibder_read.c340 libder_read_realloc(uint8_t *ptr, size_t oldsz, size_t newsz) in libder_read_realloc() argument
348 assert(newsz > oldsz); in libder_read_realloc()
350 newbuf = malloc(newsz); in libder_read_realloc()
/freebsd/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_mount.c893 size_t newsz; in libzfs_add_handle() local
896 newsz = cbp->cb_alloc != 0 ? cbp->cb_alloc * 2 : 64; in libzfs_add_handle()
899 newsz * sizeof (zfs_handle_t *)); in libzfs_add_handle()
901 cbp->cb_alloc = newsz; in libzfs_add_handle()
/freebsd/contrib/ntp/sntp/libopts/
H A Dsave.c491 truncate(char const* fname, size_t newsz) in truncate() argument
499 err = _chsize_s(fd, newsz); in truncate()
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_rtl.cpp881 const int newsz = 2 * sz; in GrowShadowStack() local
882 auto *newstack = (uptr *)Alloc(newsz * sizeof(uptr)); in GrowShadowStack()
887 thr->shadow_stack_end = newstack + newsz; in GrowShadowStack()
/freebsd/crypto/openssl/crypto/
H A Dprovider_core.c390 size_t newsz = store->provinfosz + BUILTINS_BLOCK_SIZE; in ossl_provider_info_add_to_store() local
393 sizeof(*store->provinfo) * newsz); in ossl_provider_info_add_to_store()
399 store->provinfosz = newsz; in ossl_provider_info_add_to_store()
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dzap_micro.c677 uint64_t newsz = db->db_size + SPA_MINBLOCKSIZE; in zap_lockdir_impl() local
678 if (newsz > zap_get_micro_max_size(dmu_objset_spa(os))) { in zap_lockdir_impl()
687 VERIFY0(dmu_object_set_blocksize(os, obj, newsz, 0, tx)); in zap_lockdir_impl()
691 if (newsz > SPA_OLD_MAXBLOCKSIZE) { in zap_lockdir_impl()
H A Ddmu.c1183 uint64_t newsz = offset > dn->dn_datablksz ? 0 : in dmu_read_impl() local
1185 memset((char *)buf + newsz, 0, size - newsz); in dmu_read_impl()
1186 size = newsz; in dmu_read_impl()
/freebsd/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Ddwarf.c1065 size_t newsz = 7 + strlen(old) + 1; in die_sou_create() local
1066 char *new = xmalloc(newsz); in die_sou_create()
1067 (void) snprintf(new, newsz, "orphan %s", old); in die_sou_create()
/freebsd/sys/kern/
H A Dsubr_stats.c329 static inline void * stats_realloc(void *ptr, size_t oldsz, size_t newsz,
388 stats_realloc(void *ptr, size_t oldsz, size_t newsz, int flags) in stats_realloc() argument
395 ptr = realloc(ptr, newsz, M_STATS, flags); in stats_realloc()
397 ptr = realloc(ptr, newsz); in stats_realloc()
400 memset(ptr, '\0', newsz); in stats_realloc()
401 else if (newsz > oldsz) in stats_realloc()
402 memset(BLOB_OFFSET(ptr, oldsz), '\0', newsz - oldsz); in stats_realloc()
/freebsd/contrib/flex/
H A DChangeLog911 * src/tables.c: yytbl_data_compress(), change type of local newsz to