Home
last modified time | relevance | path

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

123456

/external/ltp/testcases/kernel/syscalls/mremap/
Dmremap01.c93 int newsize; /* new size of virtual memory block */ variable
113 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
124 for (ind = 0; ind < newsize; ind++) { in main()
133 if (msync(addr, newsize, MS_SYNC) != 0) { in main()
174 newsize = (memsize * 2); in setup()
206 if (lseek(fildes, (off_t) newsize, SEEK_SET) != (off_t) newsize) { in setup()
208 "error=%d : %s", newsize, errno, strerror(errno)); in setup()
230 if (munmap(addr, newsize) != 0) in cleanup()
Dmremap04.c98 int newsize; /* new size of virtual memory block */ variable
125 addr = mremap(shmaddr, memsize, newsize, 0); in main()
134 if (munmap(addr, newsize) != 0) { in main()
186 newsize = (memsize * 2); in setup()
195 shmid = shmget(shmkey, newsize, IPC_CREAT | SHM_MODE); in setup()
Dmremap02.c88 int newsize; /* new size of virtual memory block */ variable
112 addr = mremap(addr, memsize, newsize, MREMAP_MAYMOVE); in main()
121 if (munmap(addr, newsize) != 0) { in main()
164 newsize = (memsize * 2); in setup()
Dmremap03.c90 int newsize; /* new size of virtual memory block */ variable
114 addr = mremap(bad_addr, memsize, newsize, MREMAP_MAYMOVE); in main()
123 if (munmap(addr, newsize) != 0) { in main()
170 newsize = (memsize * 2); in setup()
/external/dtc/tests/
Dnopulate.c59 int newsize, struct_start, struct_end_old, struct_end_new, delta; in main() local
76 newsize = nopulate_struct(buf, fdt); in main()
78 verbose_printf("Nopulated structure block has new size %d\n", newsize); in main()
82 fdt2 = xmalloc(fdt_totalsize(fdt) + newsize); in main()
85 delta = newsize - fdt_size_dt_struct(fdt); in main()
87 struct_end_new = struct_start + newsize; in main()
90 memcpy(fdt2 + struct_start, buf, newsize); in main()
95 fdt_set_size_dt_struct(fdt2, newsize); in main()
Ddel_property.c38 int oldsize, delsize, newsize; in main() local
81 newsize = fdt_totalsize(fdt); in main()
84 oldsize, delsize, newsize); in main()
86 if (newsize >= oldsize) in main()
Ddel_node.c37 int oldsize, delsize, newsize; in main() local
114 newsize = fdt_totalsize(fdt); in main()
117 oldsize, delsize, newsize); in main()
119 if (newsize >= oldsize) in main()
/external/bsdiff/
Dbsdiff.cc50 size_t newsize, const char* patch_filename, in bsdiff() argument
53 return bsdiff(old_buf, oldsize, new_buf, newsize, 0, &patch, in bsdiff()
58 size_t newsize, PatchWriterInterface* patch, in bsdiff() argument
60 return bsdiff(old_buf, oldsize, new_buf, newsize, 0, patch, in bsdiff()
65 size_t newsize, size_t min_length, PatchWriterInterface* patch, in bsdiff() argument
93 DiffEncoder diff_encoder(patch, old_buf, oldsize, new_buf, newsize); in bsdiff()
100 while(scan<newsize) { in bsdiff()
110 for(scsc=scan+=len;scan<newsize;scan++) { in bsdiff()
115 sai->SearchPrefix(new_buf + scan, newsize - scan, &len, &pos); in bsdiff()
140 if((len!=oldscore) || (scan==newsize)) { in bsdiff()
[all …]
Dbsdiff_main.cc69 size_t newsize; in GenerateBsdiffFromFiles() local
70 uint8_t* new_buf = static_cast<uint8_t*>(MapFile(new_filename, &newsize)); in GenerateBsdiffFromFiles()
93 int ret = bsdiff::bsdiff(old_buf, oldsize, new_buf, newsize, in GenerateBsdiffFromFiles()
97 munmap(new_buf, newsize); in GenerateBsdiffFromFiles()
/external/lua/src/
Dlmem.c51 int newsize; in luaM_growaux_() local
55 newsize = limit; /* still have at least one free place */ in luaM_growaux_()
58 newsize = (*size)*2; in luaM_growaux_()
59 if (newsize < MINSIZEARRAY) in luaM_growaux_()
60 newsize = MINSIZEARRAY; /* minimum size */ in luaM_growaux_()
62 newblock = luaM_reallocv(L, block, *size, newsize, size_elems); in luaM_growaux_()
63 *size = newsize; /* update only when everything else is OK */ in luaM_growaux_()
Dlstring.c71 void luaS_resize (lua_State *L, int newsize) { in luaS_resize() argument
74 if (newsize > tb->size) { /* grow table if needed */ in luaS_resize()
75 luaM_reallocvector(L, tb->hash, tb->size, newsize, TString *); in luaS_resize()
76 for (i = tb->size; i < newsize; i++) in luaS_resize()
84 unsigned int h = lmod(p->hash, newsize); /* new position */ in luaS_resize()
90 if (newsize < tb->size) { /* shrink table if needed */ in luaS_resize()
92 lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL); in luaS_resize()
93 luaM_reallocvector(L, tb->hash, tb->size, newsize, TString *); in luaS_resize()
95 tb->size = newsize; in luaS_resize()
Dldo.c177 void luaD_reallocstack (lua_State *L, int newsize) { in luaD_reallocstack() argument
180 lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE); in luaD_reallocstack()
182 luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue); in luaD_reallocstack()
183 for (; lim < newsize; lim++) in luaD_reallocstack()
185 L->stacksize = newsize; in luaD_reallocstack()
186 L->stack_last = L->stack + newsize - EXTRA_STACK; in luaD_reallocstack()
197 int newsize = 2 * size; in luaD_growstack() local
198 if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK; in luaD_growstack()
199 if (newsize < needed) newsize = needed; in luaD_growstack()
200 if (newsize > LUAI_MAXSTACK) { /* stack overflow? */ in luaD_growstack()
[all …]
/external/ltp/testcases/kernel/mem/mtest07/
Dmallocstress.c137 size_t newsize = 0; in allocate_free() local
149 newsize = size + oldsize; in allocate_free()
153 newsize = size * 2; in allocate_free()
156 newsize = size * 3; in allocate_free()
159 newsize = size * 5; in allocate_free()
165 if (newsize < size) in allocate_free()
167 size = newsize; in allocate_free()
/external/icu/icu4c/source/tools/tzcode/
Dialloc.c14 register int oldsize, newsize; in icatalloc() local
16 newsize = (new == NULL) ? 0 : strlen(new); in icatalloc()
19 else if (newsize == 0) in icatalloc()
22 if ((result = realloc(old, oldsize + newsize + 1)) != NULL) in icatalloc()
/external/kmod/shared/
Dstrbuf.c31 static bool buf_grow(struct strbuf *buf, size_t newsize) in buf_grow() argument
36 if (newsize <= buf->size) in buf_grow()
39 if (newsize % BUF_STEP == 0) in buf_grow()
40 sz = newsize; in buf_grow()
42 sz = ((newsize / BUF_STEP) + 1) * BUF_STEP; in buf_grow()
/external/grpc-grpc/src/core/lib/iomgr/
Dwakeup_fd_cv.cc43 unsigned int i, newsize; in cv_fd_init() local
47 newsize = GPR_MIN(g_cvfds.size * 2, g_cvfds.size + MAX_TABLE_RESIZE); in cv_fd_init()
49 gpr_realloc(g_cvfds.cvfds, sizeof(grpc_fd_node) * newsize)); in cv_fd_init()
50 for (i = g_cvfds.size; i < newsize; i++) { in cv_fd_init()
56 g_cvfds.size = newsize; in cv_fd_init()
/external/libevent/
Devport.c169 int newsize; in grow() local
173 newsize = data->ed_maxevents; in grow()
175 newsize *= 2; in grow()
176 } while (newsize < min_events); in grow()
178 newsize = min_events; in grow()
181 new_pending = mm_realloc(data->ed_pending, sizeof(int)*newsize); in grow()
185 new_pevtlist = mm_realloc(data->ed_pevtlist, sizeof(port_event_t)*newsize); in grow()
190 data->ed_maxevents = newsize; in grow()
/external/apache-xml/src/main/java/org/apache/xml/utils/
DSuballocatedIntVector.java166 int newsize=index+m_numblocks; in addElement() local
167 int[][] newMap=new int[newsize][]; in addElement()
206 int newsize=index+m_numblocks; in addElements() local
207 int[][] newMap=new int[newsize][]; in addElements()
264 int newsize=index+m_numblocks; in insertElementAt() local
265 int[][] newMap=new int[newsize][]; in insertElementAt()
398 int newsize=index+m_numblocks; in setElementAt() local
399 int[][] newMap=new int[newsize][]; in setElementAt()
/external/python/cpython3/Lib/test/
Dtest_largefile.py113 newsize = size - 10
114 f.seek(newsize)
116 self.assertEqual(f.tell(), newsize) # else pointer moved
118 self.assertEqual(f.tell(), newsize) # else wasn't truncated
121 newsize -= 1
123 f.truncate(newsize)
126 self.assertEqual(f.tell(), newsize)
/external/python/cpython2/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)
/external/tinyxml/
Dtinystr.cpp74 size_type newsize = length() + len; in append() local
75 if (newsize > capacity()) in append()
77 reserve (newsize + capacity()); in append()
80 set_size(newsize); in append()
/external/sfntly/cpp/src/test/tinyxml/
Dtinystr.cpp70 size_type newsize = length() + len; in append() local
71 if (newsize > capacity()) in append()
73 reserve (newsize + capacity()); in append()
76 set_size(newsize); in append()
/external/bsdiff/include/bsdiff/
Dbsdiff.h25 size_t newsize,
33 size_t newsize,
49 size_t newsize,
/external/libopus/src/
Dopus_demo.c254 int random_framesize=0, newsize=0, delayed_celt=0; in main() local
621 frame_size = newsize; in main()
625 newsize = rand()%6; in main()
626 switch(newsize) in main()
628 case 0: newsize=sampling_rate/400; break; in main()
629 case 1: newsize=sampling_rate/200; break; in main()
630 case 2: newsize=sampling_rate/100; break; in main()
631 case 3: newsize=sampling_rate/50; break; in main()
632 case 4: newsize=sampling_rate/25; break; in main()
633 case 5: newsize=3*sampling_rate/50; break; in main()
[all …]
/external/u-boot/common/
Ddlmalloc.c1658 INTERNAL_SIZE_T newsize; /* its size */ local
1693 newsize = oldsize = chunksize(oldp);
1732 if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE))
1734 newsize += nextsize;
1736 set_head(top, (newsize - nb) | PREV_INUSE);
1743 else if (((long)(nextsize + newsize) >= (long)(nb)))
1746 newsize += nextsize;
1770 if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE))
1774 newsize += prevsize + nextsize;
1778 set_head(top, (newsize - nb) | PREV_INUSE);
[all …]

123456