Home
last modified time | relevance | path

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

1234

/openbsd/lib/libc/stdlib/
H A Drecallocarray.c33 size_t oldsize, newsize; in recallocarray() local
44 newsize = newnmemb * size; in recallocarray()
57 if (newsize <= oldsize) { in recallocarray()
58 size_t d = oldsize - newsize; in recallocarray()
61 memset((char *)ptr + newsize, 0, d); in recallocarray()
66 newptr = malloc(newsize); in recallocarray()
70 if (newsize > oldsize) { in recallocarray()
72 memset((char *)newptr + oldsize, 0, newsize - oldsize); in recallocarray()
74 memcpy(newptr, ptr, newsize); in recallocarray()
H A Dmalloc.c600 size_t newsize; in omalloc_grow() local
2037 size_t newsize) in orecallocarray() argument
2048 if (oldsize == newsize) in orecallocarray()
2082 if (newsize > oldsize) { in orecallocarray()
2086 memcpy(newptr, p, newsize); in orecallocarray()
2102 size_t oldsize, newsize; in recallocarray_p() local
2113 newsize = newnmemb * size; in recallocarray_p()
2126 if (newsize <= oldsize) { in recallocarray_p()
2135 newptr = malloc(newsize); in recallocarray_p()
2139 if (newsize > oldsize) { in recallocarray_p()
[all …]
/openbsd/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.jason/
H A Dvecdel.C1 __SIZE_TYPE__ newsize = 0; variable
7 { newsize = i; return ::operator new [](i); }
16 if (!newsize || newsize != delsize) in main()
/openbsd/usr.bin/tail/
H A Dread.c148 size_t cnt, lineno, nlineno, recno, blen, newsize; in lines() local
158 newsize = blen + 1024; in lines()
159 if ((newp = realloc(sp, newsize)) == NULL) in lines()
162 blen = newsize; in lines()
176 newsize = cnt + 256; in lines()
178 newsize)) == NULL) in lines()
181 lines[recno].blen = newsize; in lines()
/openbsd/usr.bin/dig/lib/isc/
H A Dsymtab.c171 unsigned int i, newsize, newmax; in grow_table() local
175 newsize = symtab->size * 2; in grow_table()
176 newmax = newsize * 3 / 4; in grow_table()
177 INSIST(newsize > 0U && newmax > 0U); in grow_table()
179 newtable = reallocarray(NULL, newsize, sizeof(eltlist_t)); in grow_table()
183 for (i = 0; i < newsize; i++) in grow_table()
196 APPEND(newtable[hv % newsize], elt, link); in grow_table()
203 symtab->size = newsize; in grow_table()
/openbsd/usr.bin/tmux/
H A Dcmd-set-buffer.c63 size_t bufsize, newsize; in cmd_set_buffer_exec() local
111 if ((newsize = strlen(args_string(args, 0))) == 0) in cmd_set_buffer_exec()
123 bufdata = xrealloc(bufdata, bufsize + newsize); in cmd_set_buffer_exec()
124 memcpy(bufdata + bufsize, args_string(args, 0), newsize); in cmd_set_buffer_exec()
125 bufsize += newsize; in cmd_set_buffer_exec()
/openbsd/lib/libc/stdio/
H A Dfgetwln.c38 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
42 if (fp->_lb._size / sizeof(wchar_t) >= newsize) in __slbexpand()
44 if ((p = reallocarray(fp->_lb._base, newsize, sizeof(wchar_t))) == NULL) in __slbexpand()
47 fp->_lb._size = newsize * sizeof(wchar_t); in __slbexpand()
H A Dfgetln.c43 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
47 if (fp->_lb._size >= newsize) in __slbexpand()
49 if ((p = recallocarray(fp->_lb._base, fp->_lb._size, newsize, 1)) == NULL) in __slbexpand()
52 fp->_lb._size = newsize; in __slbexpand()
/openbsd/gnu/usr.bin/binutils-2.17/bfd/
H A Dbfdio.c161 bfd_size_type newsize, oldsize; in bfd_bwrite() local
166 newsize = (bim->size + 127) & ~(bfd_size_type) 127; in bfd_bwrite()
167 if (newsize > oldsize) in bfd_bwrite()
169 bim->buffer = bfd_realloc (bim->buffer, newsize); in bfd_bwrite()
285 bfd_size_type newsize, oldsize; in bfd_seek() local
290 newsize = (bim->size + 127) & ~(bfd_size_type) 127; in bfd_seek()
291 if (newsize > oldsize) in bfd_seek()
293 bim->buffer = bfd_realloc (bim->buffer, newsize); in bfd_seek()
/openbsd/gnu/usr.bin/binutils/bfd/
H A Dbfdio.c157 bfd_size_type newsize, oldsize; in bfd_bwrite() local
162 newsize = (bim->size + 127) & ~(bfd_size_type) 127; in bfd_bwrite()
163 if (newsize > oldsize) in bfd_bwrite()
165 bim->buffer = bfd_realloc (bim->buffer, newsize); in bfd_bwrite()
272 bfd_size_type newsize, oldsize; in bfd_seek() local
276 newsize = (bim->size + 127) & ~(bfd_size_type) 127; in bfd_seek()
277 if (newsize > oldsize) in bfd_seek()
279 bim->buffer = bfd_realloc (bim->buffer, newsize); in bfd_seek()
/openbsd/lib/libc/gen/
H A Dgetcap.c349 size_t newsize; in getent() local
353 newsize = r_end - record + BFRAG; in getent()
354 nrecord = realloc(record, newsize); in getent()
363 r_end = record + newsize; in getent()
490 size_t newsize; in getent() local
497 nrecord = realloc(record, newsize); in getent()
507 r_end = record + newsize; in getent()
752 size_t newsize, off; in cgetnext() local
756 newsize = r_end - record + BFRAG; in cgetnext()
757 nrecord = realloc(record, newsize); in cgetnext()
[all …]
/openbsd/gnu/usr.bin/perl/lib/Tie/
H A DArray.pm26 my $newsize = $obj->FETCHSIZE - 1;
28 if ($newsize >= 0)
30 $val = $obj->FETCH($newsize);
31 $obj->STORESIZE($newsize);
/openbsd/usr.bin/join/
H A Djoin.c288 u_long newsize = F->setalloc + 50; in slurp() local
290 if ((p = reallocarray(F->set, newsize, sizeof(LINE))) in slurp()
294 F->setalloc = newsize; in slurp()
332 u_long newsize = lp->fieldalloc + 50; in slurp() local
333 if ((p = reallocarray(lp->fields, newsize, in slurp()
337 lp->fieldalloc = newsize; in slurp()
529 u_long newsize = olistalloc + 50; in fieldarg() local
530 if ((p = reallocarray(olist, newsize, sizeof(OLIST))) in fieldarg()
534 olistalloc = newsize; in fieldarg()
/openbsd/sys/kern/
H A Dvfs_biomem.c214 buf_fix_mapping(struct buf *bp, vsize_t newsize) in buf_fix_mapping() argument
218 if (newsize < bp->b_bufsize) { in buf_fix_mapping()
219 pmap_kremove(va + newsize, bp->b_bufsize - newsize); in buf_fix_mapping()
225 bp->b_bufsize = newsize; in buf_fix_mapping()
/openbsd/lib/libcurses/tinfo/
H A Dread_termcap.c408 size_t newsize; in _nc_getent() local
411 newsize = (size_t) (r_end - record + BFRAG); in _nc_getent()
412 record = DOALLOC(newsize); in _nc_getent()
419 r_end = record + newsize; in _nc_getent()
546 size_t newsize; in _nc_getent() local
549 newsize = (size_t) (r_end - record + diff + BFRAG); in _nc_getent()
552 record = DOALLOC(newsize); in _nc_getent()
560 r_end = record + newsize; in _nc_getent()
/openbsd/usr.bin/rup/
H A Drup.c130 int newsize; in remember_rup_data() local
133 newsize = rup_data_max + 16; in remember_rup_data()
134 newrup = recallocarray(rup_data, rup_data_max, newsize, in remember_rup_data()
141 rup_data_max = newsize; in remember_rup_data()
/openbsd/usr.bin/bc/
H A Dscan.l221 size_t newsize;
224 newsize = strbuf_sz + arglen + 1;
225 p = realloc(strbuf, newsize);
230 strbuf_sz = newsize;
/openbsd/usr.bin/mail/
H A Dlex.c159 int newsize; in incfile() local
172 newsize = fsize(ibuf); in incfile()
174 if (newsize == 0 || newsize <= mailsize) { in incfile()
178 return(newsize == mailsize ? 0 : -1); in incfile()
/openbsd/gnu/usr.bin/texinfo/info/
H A Dman.c84 long oldsize, newsize; in get_manpage_node() local
96 newsize = (oldsize + hlen + plen); in get_manpage_node()
98 (char *)xrealloc (file_buffer->contents, 1 + newsize); in get_manpage_node()
101 file_buffer->contents[newsize] = '\0'; in get_manpage_node()
102 file_buffer->filesize = newsize; in get_manpage_node()
103 file_buffer->finfo.st_size = newsize; in get_manpage_node()
/openbsd/usr.bin/rs/
H A Drs.c334 int newsize; in getptrs() local
336 newsize = allocsize * 2; in getptrs()
337 p = reallocarray(elem, newsize, sizeof(*p)); in getptrs()
341 allocsize = newsize; in getptrs()
/openbsd/gnu/usr.bin/gcc/gcc/testsuite/g++.dg/opt/
H A Dunroll1.C236 void reallocateStorage(unsigned int newsize, bool copyold = false)
242 if (newsize > 0)
244 int nsize = newsize * sizeof(double);
247 pEndNew = pBeginNew + newsize;
/openbsd/gnu/usr.bin/perl/t/op/
H A Deach.t73 my $newsize = Hash::Util::num_buckets(%h);
74 is ($newsize, $size * 8, "resize");
77 is ($size, $newsize, "same size");
80 is ($size, $newsize, "still same size");
/openbsd/lib/libradius/
H A Dradius.c83 size_t newsize; in radius_ensure_add_capacity() local
94 newsize = ntohs(packet->pdata->length) + capacity + in radius_ensure_add_capacity()
96 newptr = realloc(packet->pdata, newsize); in radius_ensure_add_capacity()
99 packet->capacity = newsize; in radius_ensure_add_capacity()
/openbsd/gnu/lib/libstdc++/libstdc++/src/
H A Dios.cc254 int newsize = _S_local_word_size; in _M_grow_words() local
260 newsize = ix + 1; in _M_grow_words()
262 { words = new _Words[newsize]; } in _M_grow_words()
287 _M_word_size = newsize; in _M_grow_words()
/openbsd/usr.bin/dc/
H A Dstack.c293 array_grow(struct array *array, size_t newsize) in array_grow() argument
297 array->data = breallocarray(array->data, newsize, sizeof(*array->data)); in array_grow()
298 for (i = array->size; i < newsize; i++) { in array_grow()
302 array->size = newsize; in array_grow()

1234