Home
last modified time | relevance | path

Searched refs:size (Results 1 – 25 of 226) sorted by relevance

12345678910

/picolibc-latest/semihost/
Dfstat.c53 int size; in fstat() local
56 size = sys_semihost_flen(fd); in fstat()
58 size = -1; in fstat()
60 if (size > 0) { in fstat()
61 sbuf->st_size = size; in fstat()
80 int size; in fstat64() local
83 size = sys_semihost_flen(fd); in fstat64()
85 size = -1; in fstat64()
87 if (size > 0) { in fstat64()
88 sbuf->st_size = size; in fstat64()
/picolibc-latest/newlib/libc/machine/xstormy16/
Dtiny-malloc.c81 size_t size; member
150 if (block->size >= real_size) in malloc()
154 if (block->size < real_size + sizeof (struct freelist_entry)) in malloc()
161 size_t newsize = block->size - real_size; in malloc()
164 (*nextfree)->size = newsize; in malloc()
173 && __malloc_end == (void *)((size_t)block + block->size)) in malloc()
175 size_t moresize = real_size - block->size; in malloc()
209 block->size = real_size; in malloc()
233 if ((size_t)thisblock + thisblock->size == (size_t) block) in free()
235 thisblock->size += block->size; in free()
[all …]
/picolibc-latest/newlib/libc/tinystdio/
Dfmemopen.c44 size_t size; /* Current size. */ member
54 size_t pos = mf->mflags & __MAPP ? mf->size : mf->pos; in __fmem_put()
59 if (pos > mf->size) { in __fmem_put()
60 mf->size = pos; in __fmem_put()
65 if (mf->size < mf->bufsize) { in __fmem_put()
66 mf->buf[mf->size] = '\0'; in __fmem_put()
82 } else if (mf->pos < mf->size) { in __fmem_get()
95 if (mf->pos > mf->size) { in __fmem_flush()
96 mf->size = mf->pos; in __fmem_flush()
114 pos += mf->size; in __fmem_seek()
[all …]
Dfgets.c35 fgets(char *str, int size, FILE *stream) in fgets() argument
40 if ((stream->flags & __SRD) == 0 || size <= 0) in fgets()
43 size--; in fgets()
44 for (c = 0, cp = str; c != '\n' && size > 0; size--, cp++) { in fgets()
Dfgetws.c33 fgetws(wchar_t *str, int size, FILE *stream) in fgetws() argument
38 if ((stream->flags & __SRD) == 0 || size <= 0) in fgetws()
41 size--; in fgetws()
42 for (c = 0, cp = str; c != L'\n' && size > 0; size--, cp++) { in fgetws()
Dfwrite.c39 fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) in fwrite() argument
44 if ((stream->flags & __SWR) == 0 || size == 0) in fwrite()
53 !mul_overflow(size, nmemb, &bytes) && in fwrite()
59 if (bytes < (unsigned) bf->size) { in fwrite()
62 int this_time = bf->size - bf->len; in fwrite()
93 return (cp - (uint8_t *) ptr) / size; in fwrite()
97 for (j = 0; j < size; j++) in fwrite()
/picolibc-latest/newlib/libc/stdio/
Dsetvbuf.c94 register size_t size) in setvbuf() argument
108 if ((mode != _IOFBF && mode != _IOLBF) || (int)(_POINTER_INT) size < 0) in setvbuf()
136 if (size == 0) in setvbuf()
139 size = iosize; in setvbuf()
145 if ((buf = malloc (size)) == NULL) in setvbuf()
152 if (size != iosize) in setvbuf()
154 size = iosize; in setvbuf()
155 buf = malloc (size); in setvbuf()
186 if (size != iosize) in setvbuf()
197 fp->_bf._size = size; in setvbuf()
[all …]
Dvswprintf.c35 size_t size, in vswprintf() argument
42 if (size > INT_MAX / sizeof (wchar_t)) in vswprintf()
50 f._bf._size = f._w = (size > 0 ? (size - 1) * sizeof (wchar_t) : 0); in vswprintf()
56 if (size > 0) { in vswprintf()
59 if(ret >= 0 && (size_t) ret >= size) { in vswprintf()
Dswprintf.c552 size_t size, in swprintf() argument
559 if (size > INT_MAX / sizeof (wchar_t)) in swprintf()
567 f._bf._size = f._w = (size > 0 ? (size - 1) * sizeof (wchar_t) : 0); in swprintf()
575 if (size > 0) { in swprintf()
578 if(ret >= 0 && (size_t) ret >= size) { in swprintf()
Dvsniprintf.c33 size_t size, in vsniprintf() argument
40 if (size > INT_MAX) in vsniprintf()
48 f._bf._size = f._w = (size > 0 ? size - 1 : 0); in vsniprintf()
53 if (size > 0) in vsniprintf()
Dsniprintf.c31 size_t size, in sniprintf() argument
38 if (size > INT_MAX) in sniprintf()
46 f._bf._size = f._w = (size > 0 ? size - 1 : 0); in sniprintf()
53 if (size > 0) in sniprintf()
Dnano-vfprintf_i.c70 *realsz = pdata->dprec > pdata->size ? pdata->dprec : pdata->size; in _printf_common()
97 if (pdata->dprec > pdata->size) in _printf_common()
98 n += pdata->dprec - pdata->size; in _printf_common()
123 pdata->size = 1; in _printf_i()
197 if (base == 8 && (pdata->flags & ALT) && pdata->prec <= pdata->size) in _printf_i()
200 pdata->size = pdata->buf + BUF - cp; in _printf_i()
211 pdata->size = 0; in _printf_i()
226 pdata->size = pdata->prec; in _printf_i()
232 pdata->size = 1; in _printf_i()
243 PRINT (cp, pdata->size); in _printf_i()
Dvsnprintf.c34 size_t size, in vsnprintf() argument
41 if (size > INT_MAX) in vsnprintf()
49 f._bf._size = f._w = (size > 0 ? size - 1 : 0); in vsnprintf()
54 if (size > 0) in vsnprintf()
Dsnprintf.c31 size_t size, in snprintf() argument
38 if (size > INT_MAX) in snprintf()
46 f._bf._size = f._w = (size > 0 ? size - 1 : 0); in snprintf()
53 if (size > 0) in snprintf()
Dfwrite.c113 size_t size, in fwrite() argument
123 if (!(uio.uio_resid = iov.iov_len = n = count * size)) in fwrite()
148 return (n - uio.uio_resid) / size; in fwrite()
152 if (!(n = count * size)) in fwrite()
171 return i / size; in fwrite()
/picolibc-latest/test/
Dtest-fread-fwrite.c117 size_t size; in main() local
138 for (size = 1; size < 16; size <<= 1) { in main()
139 nmemb = BUF_SIZE / size; in main()
152 ret = fwrite(out + op * size * per_op, size, per_op, f); in main()
159 fseek(f, size * offsets[op] - offset, SEEK_CUR); in main()
160 ret = fwrite(out + size * offsets[op], size, per_op, f); in main()
161 offset = size * offsets[op] + size * per_op; in main()
173 ret = fread(in + op * size * per_op, size, per_op, f); in main()
180 fseek(f, size * offsets[op] - offset, SEEK_CUR); in main()
181 ret = fread(in + size * offsets[op], size, per_op, f); in main()
[all …]
Dmalloc_stress.c102 size_t size = block_size[i]; in check_block() local
109 for (j = 0; j < size; j++) in check_block()
238 size_t size = randint(MAX_ALLOC); in main() local
239 uint8_t *new_block = malloc(size); in main()
240 if (new_block || size == 0) { in main()
241 block_size[i] = size; in main()
243 in_use += size; in main()
255 size_t size = randint(MAX_ALLOC); in main() local
257 uint8_t *new_block = realloc(blocks[j], size); in main()
258 if (new_block || size == 0) { in main()
[all …]
/picolibc-latest/newlib/libc/machine/spu/
Drealloc_ea.c43 unsigned long long size; member
50 realloc_ea (__ea void *ptr, size_ea_t size) in realloc_ea() argument
54 args.size = (unsigned long long) size; in realloc_ea()
Dposix_memalign_ea.c45 unsigned long long size; member
52 posix_memalign_ea (__ea void **memptr, size_ea_t align, size_ea_t size) in posix_memalign_ea() argument
65 arg.size = (unsigned long long) size; in posix_memalign_ea()
Dsetvbuf.c47 size_t size; member
57 size_t size) in setvbuf() argument
66 args.size = size; in setvbuf()
Dfread.c43 size_t size; member
54 size_t size, in fread() argument
63 args.size = size; in fread()
Dfwrite.c45 size_t size; member
54 size_t size, in fwrite() argument
63 args.size = size; in fwrite()
Dvsnprintf.c46 size_t size; member
57 size_t size, in vsnprintf() argument
66 args.size = size; in vsnprintf()
/picolibc-latest/newlib/libc/stdlib/
Dnano-realloc.c36 realloc(void * ptr, size_t size) in realloc() argument
41 return malloc(size); in realloc()
43 if (size == 0) in realloc()
49 if (size > MALLOC_MAXSIZE) in realloc()
55 size_t new_size = chunk_size(size); in realloc()
128 mem = malloc(size); in realloc()
/picolibc-latest/newlib/libc/machine/nvptx/
Dmalloc.c24 void *malloc (size_t size) in malloc() argument
26 long long *ptr = sys_malloc (size + sizeof (long long)); in malloc()
28 *(size_t *)ptr++ = size; in malloc()

12345678910