Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 354) sorted by relevance

12345678910>>...15

/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_umem.c77 (ulong_t)nbytes); in mdb_umem_handler()
96 (ulong_t)nbytes); in mdb_umem_handler()
106 ptr = malloc(nbytes); in mdb_umem_handler()
170 size_t obytes = nbytes; in mdb_alloc_align()
172 if (nbytes == 0 || nbytes > MDB_ALLOC_MAX) in mdb_alloc_align()
175 nbytes = (nbytes + sizeof (uint32_t) - 1) & ~(sizeof (uint32_t) - 1); in mdb_alloc_align()
176 if (nbytes < obytes || nbytes == 0) in mdb_alloc_align()
182 ptr = malloc(nbytes); in mdb_alloc_align()
210 bzero(ptr, nbytes); in mdb_zalloc()
220 nbytes = (nbytes + sizeof (uint32_t) - 1) & ~(sizeof (uint32_t) - 1); in mdb_free()
[all …]
H A Dmdb_fdio.c60 return (read(fdp->fd_fd, buf, nbytes)); in fdio_read()
62 return (IOP_READ(io->io_next, buf, nbytes)); in fdio_read()
71 return (write(fdp->fd_fd, buf, nbytes)); in fdio_write()
73 return (IOP_WRITE(io->io_next, buf, nbytes)); in fdio_write()
191 ssize_t resid = nbytes; in fdio_bdev_read()
197 return (IOP_READ(io->io_next, buf, nbytes)); in fdio_bdev_read()
218 if (resid == nbytes && nbytes != 0) in fdio_bdev_read()
222 return (nbytes - resid); in fdio_bdev_read()
235 ssize_t resid = nbytes; in fdio_bdev_write()
266 if (resid == nbytes && nbytes != 0) in fdio_bdev_write()
[all …]
H A Dmdb_value.c66 value_read(mdb_tgt_t *t, void *dst, size_t nbytes, uintptr_t addr) in value_read() argument
79 size = nbytes; in value_read()
82 nbytes = MIN(size, nbytes); in value_read()
93 if (off + nbytes > sizeof (uintmax_t)) in value_read()
94 nbytes = sizeof (uintmax_t) - off; in value_read()
96 if (nbytes != 0) in value_read()
97 bcopy(src + off, dst, nbytes); in value_read()
99 return (nbytes); in value_read()
104 value_write(mdb_tgt_t *t, const void *buf, size_t nbytes, uintptr_t addr) in value_write() argument
106 return (nbytes); /* We allow writes to silently fail */ in value_write()
H A Dmdb_modapi.c172 if (rbytes > 0 && rbytes < nbytes) in mdb_vread()
173 return (set_errbytes(rbytes, nbytes)); in mdb_vread()
189 if (rbytes > 0 && rbytes < nbytes) in mdb_aread()
206 if (rbytes > 0 && rbytes < nbytes) in mdb_fread()
223 if (rbytes > 0 && rbytes < nbytes) in mdb_pread()
239 buf, nbytes, addr)); in mdb_readstr()
254 if (rbytes > 0 && rbytes < nbytes) in mdb_readsym()
313 size_t nbytes, GElf_Sym *sym) in mdb_lookup_by_addr() argument
316 buf, nbytes, sym, NULL)); in mdb_lookup_by_addr()
388 nbytes = mdb_iob_vsnprintf(buf, nbytes, format, alist); in mdb_snprintf()
[all …]
/illumos-gate/usr/src/psm/stand/boot/common/
H A Dheap_kmem.c148 size_t nbytes; member
453 if (nbytes == 0) { in kmem_alloc()
492 while (left_weight >= nbytes || right_weight >= nbytes) { in kmem_alloc()
579 bzero(retblock, nbytes); in kmem_alloc()
617 if (nbytes == 0) { in kmem_free()
640 nbytes += neigh_size; in kmem_free()
731 size_t nbytes; in check_need_to_free() local
739 nbytes = ntf->nbytes; in check_need_to_free()
749 nbytes = ntf[i].nbytes; in check_need_to_free()
773 morecore(size_t nbytes) in morecore() argument
[all …]
/illumos-gate/usr/src/cmd/fm/modules/common/eversholt/
H A Dalloc.c92 ASSERT(nbytes > 0); in alloc_malloc()
98 bcopy((void *)&nbytes, (void *)retval, sizeof (nbytes)); in alloc_malloc()
102 stats_counter_add(Malloctotal, nbytes); in alloc_malloc()
107 totalcount += nbytes + HDRSIZ; in alloc_malloc()
119 void *retval = alloc_malloc(nbytes, fname, line); in alloc_realloc()
127 bcopy(ptr, retval, (osize < nbytes) ? osize : nbytes); in alloc_realloc()
188 alloc_xmalloc(size_t nbytes) in alloc_xmalloc() argument
192 ASSERT(nbytes > 0); in alloc_xmalloc()
193 retval = fmd_hdl_alloc(Hdl, nbytes, FMD_SLEEP); in alloc_xmalloc()
195 stats_counter_add(Malloctotal, nbytes); in alloc_xmalloc()
[all …]
/illumos-gate/usr/src/cmd/fm/eversholt/common/
H A Dalloc.h38 void *alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line);
39 void *alloc_malloc(size_t nbytes, const char *fname, int line);
47 #define MALLOC(nbytes) alloc_malloc(nbytes, __FILE__, __LINE__) argument
48 #define REALLOC(ptr, nbytes) alloc_realloc(ptr, nbytes, __FILE__, __LINE__) argument
54 #define MALLOC(nbytes) alloc_malloc(nbytes, "???", __LINE__) argument
55 #define REALLOC(ptr, nbytes) alloc_realloc(ptr, nbytes, "???", __LINE__) argument
H A Dalloc.c68 alloc_malloc(size_t nbytes, const char *fname, int line) in alloc_malloc() argument
70 void *retval = malloc(nbytes); in alloc_malloc()
76 stats_counter_add(Malloctotal, nbytes); in alloc_malloc()
90 alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line) in alloc_realloc() argument
92 void *retval = realloc(ptr, nbytes); in alloc_realloc()
133 alloc_xmalloc(size_t nbytes) in alloc_xmalloc() argument
137 retval = malloc(nbytes); in alloc_xmalloc()
141 stats_counter_add(Malloctotal, nbytes); in alloc_xmalloc()
/illumos-gate/usr/src/lib/libc/port/stdio/
H A Dfmemopen.c69 nbytes = MIN(nbytes, fmp->fmo_lsize - fmp->fmo_pos); in fmemopen_read()
70 if (nbytes == 0) { in fmemopen_read()
75 fmp->fmo_pos += nbytes; in fmemopen_read()
77 return (nbytes); in fmemopen_read()
95 if (nbytes == 0) { in fmemopen_write()
97 } else if (nbytes >= SSIZE_MAX) { in fmemopen_write()
102 npos = fmp->fmo_pos + nbytes; in fmemopen_write()
103 if (npos < nbytes) { in fmemopen_write()
107 nbytes = fmp->fmo_alloc - fmp->fmo_pos; in fmemopen_write()
111 fmp->fmo_pos += nbytes; in fmemopen_write()
[all …]
/illumos-gate/usr/src/uts/common/fs/ufs/
H A Dufs_directio.c132 size_t nbytes; member
269 dbp->nbytes = nbytes; in directio_start()
273 bp->b_bcount = nbytes; in directio_start()
337 size_t nbytes; in ufs_directio_write() local
422 while (nbytes--) { in ufs_directio_write()
669 nbytes = (size_t)MIN(nbytes, len); in ufs_directio_write()
696 resid -= nbytes; in ufs_directio_write()
804 size_t nbytes; in ufs_directio_read() local
846 while (nbytes--) { in ufs_directio_read()
980 nbytes = (size_t)MIN(nbytes, len); in ufs_directio_read()
[all …]
/illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/
H A Dbt_split.c199 if (n < nbytes) {
203 nbytes = n;
211 nbytes = NRINTERNAL;
542 u_int32_t nbytes; local
553 nbytes = NBINTERNAL(0);
626 u_int32_t nbytes; local
642 nbytes = ilen;
653 nbytes = NBLEAF(bl);
758 nbytes = NBLEAF(bl);
762 nbytes = NRINTERNAL;
[all …]
/illumos-gate/usr/src/uts/common/inet/
H A Dtunables.c107 size_t nbytes; in mod_get_boolean() local
118 if (nbytes >= psize) in mod_get_boolean()
196 size_t nbytes; in mod_get_uint32() local
208 if (nbytes >= psize) in mod_get_uint32()
272 size_t nbytes; in mod_get_buf_prop() local
329 size -= nbytes + 1; in mod_get_allprop()
330 pval += nbytes + 1; in mod_get_allprop()
331 tbytes += nbytes + 1; in mod_get_allprop()
523 size -= nbytes; in mod_get_extra_privports()
524 pval += nbytes; in mod_get_extra_privports()
[all …]
/illumos-gate/usr/src/cmd/sh/
H A Dblok.c69 alloc(size_t nbytes) in alloc() argument
313 realloc(pp, nbytes) in realloc() argument
315 size_t nbytes;
318 realloc(pp, nbytes)
320 size_t nbytes;
334 q = alloc(nbytes);
341 q = alloc(nbytes);
342 memcpy(q, pp, nbytes);
358 q = alloc(nbytes);
365 q = alloc(nbytes);
[all …]
/illumos-gate/usr/src/lib/libproc/common/
H A DPscantext.c54 int nbytes; /* number of bytes in buffer */ in Pscantext() local
140 if ((nbytes = read(P->asfd, buf, 2*BLKSIZE)) <= 0) in Pscantext()
143 if (nbytes < BLKSIZE) in Pscantext()
146 n2bytes = nbytes - BLKSIZE; in Pscantext()
147 nbytes = BLKSIZE; in Pscantext()
154 if (nbytes <= 0) { /* shift buffers */ in Pscantext()
155 if ((nbytes = n2bytes) <= 0) in Pscantext()
159 nbytes); in Pscantext()
162 if (nbytes == BLKSIZE && in Pscantext()
169 if (syspri = Pissyscall_text(P, p, nbytes)) in Pscantext()
[all …]
H A DPcore.c791 if (read(P->asfd, plat, nbytes) != nbytes) { in note_platform()
818 if (nbytes != 0 && ((psf = malloc(nbytes)) != NULL)) { in note_secflags()
819 if (read(P->asfd, psf, nbytes) != nbytes) { in note_secflags()
904 if (read(P->asfd, pcrp, nbytes) != nbytes) { in note_cred()
937 if (read(P->asfd, pldt, nbytes) != nbytes) { in note_ldt()
961 if (read(P->asfd, pprvp, nbytes) != nbytes) { in note_priv()
986 if (read(P->asfd, ppii, nbytes) != nbytes || in note_priv_info()
1010 if (read(P->asfd, zonename, nbytes) != nbytes) { in note_zonename()
1037 if (read(P->asfd, a32, nbytes) != nbytes) { in note_auxv()
1056 if (read(P->asfd, P->auxv, nbytes) != nbytes) { in note_auxv()
[all …]
/illumos-gate/usr/src/lib/fm/libdiskstatus/common/
H A Dds_scsi_uscsi.c1203 int nbytes; in uscsi_mode_sense() local
1229 ucmd.uscsi_buflen = nbytes; in uscsi_mode_sense()
1345 int nbytes; in uscsi_mode_sense_10() local
1369 ucmd.uscsi_buflen = nbytes; in uscsi_mode_sense_10()
1443 nbytes); in uscsi_mode_sense_10()
1467 int nbytes; in uscsi_mode_select() local
1505 nbytes += page_size; in uscsi_mode_select()
1518 ucmd.uscsi_buflen = nbytes; in uscsi_mode_select()
1536 int nbytes; in uscsi_mode_select_10() local
1577 nbytes += page_size; in uscsi_mode_select_10()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dmemalign.c61 memalign(size_t align, size_t nbytes) in memalign() argument
81 if (nbytes == 0 || _misaligned(align) || align == 0 || in memalign()
98 if (nbytes > MAX_MALLOC) { in memalign()
102 ROUND(nbytes); in memalign()
103 if (nbytes < MINSIZE) in memalign()
104 nbytes = MINSIZE; in memalign()
108 reqsize = nbytes + align + (MINSIZE + WORDSIZE); in memalign()
111 if (reqsize < nbytes) { in memalign()
169 frag_size = blksize - nbytes; in memalign()
175 SIZE(aligned_blk) = nbytes; in memalign()
/illumos-gate/usr/src/cmd/mdb/common/modules/mdb_test/
H A Dmdb_test.c175 size_t nbytes; in cmd_vread() local
185 nbytes = (size_t)argv->a_un.a_val; in cmd_vread()
187 buf = mdb_alloc(nbytes, UM_SLEEP | UM_GC); in cmd_vread()
188 rbytes = mdb_vread(buf, nbytes, addr); in cmd_vread()
192 nbytes, rbytes); in cmd_vread()
203 size_t nbytes; in cmd_pread() local
213 nbytes = (size_t)argv->a_un.a_val; in cmd_pread()
220 nbytes, rbytes); in cmd_pread()
231 size_t nbytes; in cmd_readsym() local
242 nbytes = (size_t)argv[1].a_un.a_val; in cmd_readsym()
[all …]
/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dwritefile.c51 int nbytes; in writefile() local
122 nbytes = write(fo, cp, mapsize); in writefile()
128 if ((nbytes >= 0) && (nbytes != (int)mapsize)) { in writefile()
129 remains = mapsize - nbytes; in writefile()
131 nbytes = write(fo, in writefile()
133 if (nbytes < 0) { in writefile()
145 remains -= nbytes; in writefile()
147 nbytes = mapsize; in writefile()
157 if (nbytes < 0) { in writefile()
173 filesize -= nbytes; in writefile()
[all …]
/illumos-gate/usr/src/cmd/bhyve/
H A Dsockstream.c43 stream_read(int fd, void *buf, ssize_t nbytes) in stream_read() argument
51 while (len < nbytes) { in stream_read()
52 n = read(fd, p + len, nbytes - len); in stream_read()
67 stream_write(int fd, const void *buf, ssize_t nbytes) in stream_write() argument
75 while (len < nbytes) { in stream_write()
77 n = write(fd, p + len, nbytes - len); in stream_write()
79 n = send(fd, p + len, nbytes - len, MSG_NOSIGNAL); in stream_write()
/illumos-gate/usr/src/lib/libbsdmalloc/common/
H A Dmalloc.bsd43.c96 malloc(size_t nbytes) in malloc() argument
141 if (nbytes <= (n = pagesz - sizeof (*op))) { in malloc()
149 while (nbytes > amt + n) { in malloc()
263 realloc(void *cp, size_t nbytes) in realloc() argument
272 return (malloc(nbytes)); in realloc()
291 if ((res = malloc(nbytes)) != NULL) in realloc()
292 (void) memmove(res, cp, nbytes); in realloc()
311 if (nbytes <= onb && nbytes > sz) { in realloc()
316 if ((res = malloc(nbytes)) == NULL) in realloc()
319 (void) memmove(res, cp, (nbytes < onb) ? nbytes : onb); in realloc()
/illumos-gate/usr/src/common/smbsrv/
H A Dsmb_utf8.c200 if (mbs != NULL && nbytes > 0) in smb_wcstombs()
220 mbslen = nbytes; in smb_wcstombs()
226 if (mbslen < nbytes) in smb_wcstombs()
272 size_t nbytes; in smb_sbequiv_strlen() local
276 nbytes = smb_mbtowc(NULL, mbs, MTS_MB_CHAR_MAX); in smb_sbequiv_strlen()
277 if (nbytes == ((size_t)-1)) in smb_sbequiv_strlen()
279 if (nbytes == 0) in smb_sbequiv_strlen()
282 if (nbytes == 1) { in smb_sbequiv_strlen()
285 } else if (nbytes < 8) { in smb_sbequiv_strlen()
290 (void) strlcpy(mbsbuf, mbs, nbytes+1); in smb_sbequiv_strlen()
[all …]
/illumos-gate/usr/src/lib/libipmp/common/
H A Dipmp_mpathd.c171 ssize_t nbytes; in ipmp_write() local
174 for (nwritten = 0; nwritten < buflen; nwritten += nbytes) { in ipmp_write()
175 nbytes = write(fd, &buf[nwritten], buflen - nwritten); in ipmp_write()
176 if (nbytes == -1) in ipmp_write()
178 if (nbytes == 0) { in ipmp_write()
227 ssize_t nbytes = 0; /* total bytes processed */ in ipmp_read() local
231 while (nbytes < buflen) { in ipmp_read()
267 prbytes = read(fd, (caddr_t)buffer + nbytes, buflen - nbytes); in ipmp_read()
273 nbytes += prbytes; in ipmp_read()
276 return (nbytes == buflen ? IPMP_SUCCESS : IPMP_FAILURE); in ipmp_read()
/illumos-gate/usr/src/lib/libpicl/
H A Dpicl.c364 req_attrval.bufsize = (uint32_t)nbytes; in picl_get_propval()
377 if (ret->ret_attrval.nbytes > (uint32_t)nbytes) in picl_get_propval()
381 (size_t)ret->ret_attrval.nbytes); in picl_get_propval()
393 void *valbuf, size_t nbytes) in picl_get_propval_by_name() argument
417 if (ret->ret_attrvalbyname.nbytes > (uint32_t)nbytes) in picl_get_propval_by_name()
445 inargs->bufsize = (uint32_t)nbytes; in picl_set_propval()
446 if ((size_t)inargs->bufsize != nbytes) in picl_set_propval()
451 nbytes, NULL, 0, &ret_setattrval, in picl_set_propval()
467 void *valbuf, size_t nbytes) in picl_set_propval_by_name() argument
481 inargs->bufsize = (uint32_t)nbytes; in picl_set_propval_by_name()
[all …]
/illumos-gate/usr/src/lib/libc/port/locale/
H A Dwcsnrtombs.c65 size_t nbytes; in __wcsnrtombs_std() local
69 nbytes = 0; in __wcsnrtombs_std()
77 return (nbytes + nb - 1); in __wcsnrtombs_std()
79 nbytes += nb; in __wcsnrtombs_std()
81 return (nbytes); in __wcsnrtombs_std()
113 return (nbytes + nb - 1); in __wcsnrtombs_std()
118 nbytes += nb; in __wcsnrtombs_std()
121 return (nbytes); in __wcsnrtombs_std()

12345678910>>...15