Home
last modified time | relevance | path

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

12

/device/linaro/bootloader/edk2/AppPkg/Applications/Lua/src/
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_()
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()
Dldo.c161 void luaD_reallocstack (lua_State *L, int newsize) { in luaD_reallocstack() argument
164 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE); in luaD_reallocstack()
166 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue); in luaD_reallocstack()
167 for (; lim < newsize; lim++) in luaD_reallocstack()
169 L->stacksize = newsize; in luaD_reallocstack()
170 L->stack_last = L->stack + newsize - EXTRA_STACK; in luaD_reallocstack()
181 int newsize = 2 * size; in luaD_growstack() local
182 if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK; in luaD_growstack()
183 if (newsize < needed) newsize = needed; in luaD_growstack()
184 if (newsize > LUAI_MAXSTACK) { /* stack overflow? */ in luaD_growstack()
[all …]
Dlstring.h40 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
Dlauxlib.c441 size_t newsize = B->size * 2; /* double buffer size */ in luaL_prepbuffsize() local
442 if (newsize - B->n < sz) /* not big enough? */ in luaL_prepbuffsize()
443 newsize = B->n + sz; in luaL_prepbuffsize()
444 if (newsize < B->n || newsize - B->n < sz) in luaL_prepbuffsize()
447 newbuff = (char *)lua_newuserdata(L, newsize * sizeof(char)); in luaL_prepbuffsize()
453 B->size = newsize; in luaL_prepbuffsize()
Dldo.h38 LUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);
Dllex.c55 size_t newsize; in save() local
58 newsize = luaZ_sizebuffer(b) * 2; in save()
59 luaZ_resizebuffer(ls->L, b, newsize); in save()
/device/linaro/bootloader/edk2/StdLib/LibC/Stdio/
Dfgetstr.c68 __slbexpand(FILE *fp, size_t newsize) in __slbexpand() argument
73 ++newsize; in __slbexpand()
81 if ((size_t)fp->_lb._size >= newsize) in __slbexpand()
83 if ((p = realloc(fp->_lb._base, newsize)) == NULL) in __slbexpand()
86 fp->_lb._size = (int)newsize; in __slbexpand()
Dvfwprintf.c1945 int n, newsize = oldsize * 2; in __grow_type_table() local
1947 if (newsize < nextarg + 1) in __grow_type_table()
1948 newsize = nextarg + 1; in __grow_type_table()
1950 if ((newtable = malloc(newsize * sizeof(enum typeid))) == NULL) in __grow_type_table()
1954 newtable = realloc(oldtable, newsize * sizeof(enum typeid)); in __grow_type_table()
1960 for (n = oldsize; n < newsize; n++) in __grow_type_table()
1964 *tablesize = newsize; in __grow_type_table()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
Dtest_largefile.py116 newsize = size - 10
117 f.seek(newsize)
119 self.assertEqual(f.tell(), newsize) # else pointer moved
121 self.assertEqual(f.tell(), newsize) # else wasn't truncated
124 newsize -= 1
126 f.truncate(newsize)
130 self.assertEqual(f.tell(), newsize)
Dtest_sys.py710 newsize = PySet_MINSIZE
711 while newsize <= minused:
712 newsize = newsize << 1
713 if newsize <= 8:
717 check(set(sample), s + newsize*struct.calcsize('lP'))
718 check(frozenset(sample), s + newsize*struct.calcsize('lP'))
/device/linaro/bootloader/edk2/EmbeddedPkg/Library/FdtLib/
Dfdt_rw.c423 int newsize; in fdt_open_into() local
455 newsize = FDT_ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size in fdt_open_into()
458 if (bufsize < newsize) in fdt_open_into()
464 if (((tmp + newsize) > fdtstart) && (tmp < fdtend)) { in fdt_open_into()
467 if ((tmp + newsize) > ((char *)buf + bufsize)) in fdt_open_into()
472 memmove(buf, tmp, newsize); in fdt_open_into()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/
DcStringIO.c408 size_t newsize = oself->buf_size; in O_cwrite() local
409 newsize *= 2; in O_cwrite()
410 if (newsize <= (size_t)newpos || newsize > PY_SSIZE_T_MAX) { in O_cwrite()
412 newsize = newpos + 1; in O_cwrite()
414 newbuf = (char*)realloc(oself->buf, newsize); in O_cwrite()
419 oself->buf_size = (Py_ssize_t)newsize; in O_cwrite()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/_io/
Dfileio.c552 size_t newsize = new_buffersize(self, total); in fileio_readall() local
553 if (newsize > PY_SSIZE_T_MAX || newsize <= 0) { in fileio_readall()
561 if (PyBytes_GET_SIZE(result) < (Py_ssize_t)newsize) { in fileio_readall()
562 if (_PyBytes_Resize(&result, newsize) < 0) { in fileio_readall()
575 newsize - total); in fileio_readall()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Objects/
Dtupleobject.c837 _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize) in _PyTuple_Resize() argument
853 if (oldsize == newsize) in _PyTuple_Resize()
861 *pv = PyTuple_New(newsize); in _PyTuple_Resize()
871 for (i = newsize; i < oldsize; i++) { in _PyTuple_Resize()
874 sv = PyObject_GC_Resize(PyTupleObject, v, newsize); in _PyTuple_Resize()
882 if (newsize > oldsize) in _PyTuple_Resize()
884 sizeof(*sv->ob_item) * (newsize - oldsize)); in _PyTuple_Resize()
Dsetobject.c276 Py_ssize_t newsize; in set_table_resize() local
285 for (newsize = PySet_MINSIZE; in set_table_resize()
286 newsize <= minused && newsize > 0; in set_table_resize()
287 newsize <<= 1) in set_table_resize()
289 if (newsize <= 0) { in set_table_resize()
299 if (newsize == PySet_MINSIZE) { in set_table_resize()
319 newtable = PyMem_NEW(setentry, newsize); in set_table_resize()
329 so->mask = newsize - 1; in set_table_resize()
330 memset(newtable, 0, sizeof(setentry) * newsize); in set_table_resize()
/device/linaro/bootloader/edk2/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/
Dst.c116 int newsize; local
118 for (i = 0, newsize = MINSIZE;
120 i++, newsize <<= 1)
122 if (newsize > size) return primes[i];
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/_io/
Dfileio.c542 size_t newsize = new_buffersize(self, total); in fileio_readall() local
543 if (newsize > PY_SSIZE_T_MAX || newsize <= 0) { in fileio_readall()
551 if (PyBytes_GET_SIZE(result) < (Py_ssize_t)newsize) { in fileio_readall()
552 if (_PyBytes_Resize(&result, newsize) < 0) in fileio_readall()
557 n = newsize - total; in fileio_readall()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Objects/
Dtupleobject.c847 _PyTuple_Resize(PyObject **pv, Py_ssize_t newsize) in _PyTuple_Resize() argument
863 if (oldsize == newsize) in _PyTuple_Resize()
871 *pv = PyTuple_New(newsize); in _PyTuple_Resize()
881 for (i = newsize; i < oldsize; i++) { in _PyTuple_Resize()
885 sv = PyObject_GC_Resize(PyTupleObject, v, newsize); in _PyTuple_Resize()
893 if (newsize > oldsize) in _PyTuple_Resize()
895 sizeof(*sv->ob_item) * (newsize - oldsize)); in _PyTuple_Resize()
/device/linaro/bootloader/edk2/StdLib/PosixLib/Glob/
Dglob.c822 size_t i, newsize, len; in globextend() local
829 newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); in globextend()
830 pathv = pglob->gl_pathv ? realloc(pglob->gl_pathv, newsize) : in globextend()
831 malloc(newsize); in globextend()
857 (newsize + limit[GLOB_INDEX_MALLOC]) >= GLOB_LIMIT_MALLOC) { in globextend()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Parser/
Dtokenizer.c948 Py_ssize_t newsize = curvalid + BUFSIZ; in tok_nextc() local
951 newsize); in tok_nextc()
959 tok->end = tok->buf + newsize; in tok_nextc()
1321 int newsize = atoi(tp + strlen(*cp)); in tok_get() local
1323 if (newsize >= 1 && newsize <= 40) { in tok_get()
1324 tok->tabsize = newsize; in tok_get()
1328 newsize); in tok_get()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Parser/
Dtokenizer.c968 Py_ssize_t newsize = curvalid + BUFSIZ; in tok_nextc() local
971 newsize); in tok_nextc()
979 tok->end = tok->buf + newsize; in tok_nextc()
1341 int newsize = atoi(tp + strlen(*cp)); in tok_get() local
1343 if (newsize >= 1 && newsize <= 40) { in tok_get()
1344 tok->tabsize = newsize; in tok_get()
1348 newsize); in tok_get()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/PyMod-2.7.2/Python/
Dmarshal.c83 Py_ssize_t size, newsize; in w_more() local
87 newsize = size + size + 1024; in w_more()
88 if (newsize > 32*1024*1024) { in w_more()
89 newsize = size + (size >> 3); /* 12.5% overallocation */ in w_more()
91 if (_PyString_Resize(&p->str, newsize) != 0) { in w_more()
97 PyString_AS_STRING((PyStringObject *)p->str) + newsize; in w_more()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/PyMod-2.7.10/Python/
Dmarshal.c82 Py_ssize_t size, newsize; in w_more() local
86 newsize = size + size + 1024; in w_more()
87 if (newsize > 32*1024*1024) { in w_more()
88 newsize = size + (size >> 3); /* 12.5% overallocation */ in w_more()
90 if (_PyString_Resize(&p->str, newsize) != 0) { in w_more()
96 PyString_AS_STRING((PyStringObject *)p->str) + newsize; in w_more()
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/
Dmarshal.c83 Py_ssize_t size, newsize; in w_more() local
87 newsize = size + size + 1024; in w_more()
88 if (newsize > 32*1024*1024) { in w_more()
89 newsize = size + (size >> 3); /* 12.5% overallocation */ in w_more()
91 if (_PyString_Resize(&p->str, newsize) != 0) { in w_more()
97 PyString_AS_STRING((PyStringObject *)p->str) + newsize; in w_more()

12