Home
last modified time | relevance | path

Searched refs:nbytes (Results 1 – 25 of 360) 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.c112 if (rbytes > 0 && rbytes < nbytes) in mdb_vread()
113 return (set_errbytes(rbytes, nbytes)); in mdb_vread()
129 if (rbytes > 0 && rbytes < nbytes) in mdb_aread()
146 if (rbytes > 0 && rbytes < nbytes) in mdb_fread()
163 if (rbytes > 0 && rbytes < nbytes) in mdb_pread()
179 buf, nbytes, addr)); in mdb_readstr()
194 if (rbytes > 0 && rbytes < nbytes) in mdb_readsym()
253 size_t nbytes, GElf_Sym *sym) in mdb_lookup_by_addr() argument
256 buf, nbytes, sym, NULL)); in mdb_lookup_by_addr()
304 nbytes = mdb_iob_vsnprintf(buf, nbytes, format, alist); in mdb_snprintf()
[all …]
H A Dmdb_rawfile.c122 if ((rbytes = IOP_READ(io, buf, nbytes)) == 0) in rf_read()
137 return (IOP_WRITE(io, buf, nbytes)); in rf_write()
182 return (rf_read(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vread()
184 return (rf_read(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vread()
191 return (rf_write(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vwrite()
193 return (rf_write(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vwrite()
200 return (rf_read(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_pread()
202 return (rf_read(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_pread()
209 return (rf_write(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_pwrite()
211 return (rf_write(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_pwrite()
[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.c94 ASSERT(nbytes > 0); in alloc_malloc()
100 bcopy((void *)&nbytes, (void *)retval, sizeof (nbytes)); in alloc_malloc()
104 stats_counter_add(Malloctotal, nbytes); in alloc_malloc()
109 totalcount += nbytes + HDRSIZ; in alloc_malloc()
121 void *retval = alloc_malloc(nbytes, fname, line); in alloc_realloc()
129 bcopy(ptr, retval, (osize < nbytes) ? osize : nbytes); in alloc_realloc()
190 alloc_xmalloc(size_t nbytes) in alloc_xmalloc() argument
194 ASSERT(nbytes > 0); in alloc_xmalloc()
195 retval = fmd_hdl_alloc(Hdl, nbytes, FMD_SLEEP); in alloc_xmalloc()
197 stats_counter_add(Malloctotal, nbytes); in alloc_xmalloc()
[all …]
/illumos-gate/usr/src/cmd/fm/eversholt/common/
H A Dalloc.h40 void *alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line);
41 void *alloc_malloc(size_t nbytes, const char *fname, int line);
49 #define MALLOC(nbytes) alloc_malloc(nbytes, __FILE__, __LINE__) argument
50 #define REALLOC(ptr, nbytes) alloc_realloc(ptr, nbytes, __FILE__, __LINE__) argument
56 #define MALLOC(nbytes) alloc_malloc(nbytes, "???", __LINE__) argument
57 #define REALLOC(ptr, nbytes) alloc_realloc(ptr, nbytes, "???", __LINE__) argument
H A Dalloc.c70 alloc_malloc(size_t nbytes, const char *fname, int line) in alloc_malloc() argument
72 void *retval = malloc(nbytes); in alloc_malloc()
78 stats_counter_add(Malloctotal, nbytes); in alloc_malloc()
92 alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line) in alloc_realloc() argument
94 void *retval = realloc(ptr, nbytes); in alloc_realloc()
135 alloc_xmalloc(size_t nbytes) in alloc_xmalloc() argument
139 retval = malloc(nbytes); in alloc_xmalloc()
143 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.c201 if (n < nbytes) {
205 nbytes = n;
213 nbytes = NRINTERNAL;
544 u_int32_t nbytes; local
555 nbytes = NBINTERNAL(0);
628 u_int32_t nbytes; local
644 nbytes = ilen;
655 nbytes = NBLEAF(bl);
760 nbytes = NBLEAF(bl);
764 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.c56 int nbytes; /* number of bytes in buffer */ in Pscantext() local
142 if ((nbytes = read(P->asfd, buf, 2*BLKSIZE)) <= 0) in Pscantext()
145 if (nbytes < BLKSIZE) in Pscantext()
148 n2bytes = nbytes - BLKSIZE; in Pscantext()
149 nbytes = BLKSIZE; in Pscantext()
156 if (nbytes <= 0) { /* shift buffers */ in Pscantext()
157 if ((nbytes = n2bytes) <= 0) in Pscantext()
161 nbytes); in Pscantext()
164 if (nbytes == BLKSIZE && in Pscantext()
171 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.c177 size_t nbytes; in cmd_vread() local
187 nbytes = (size_t)argv->a_un.a_val; in cmd_vread()
189 buf = mdb_alloc(nbytes, UM_SLEEP | UM_GC); in cmd_vread()
190 rbytes = mdb_vread(buf, nbytes, addr); in cmd_vread()
194 nbytes, rbytes); in cmd_vread()
205 size_t nbytes; in cmd_pread() local
215 nbytes = (size_t)argv->a_un.a_val; in cmd_pread()
222 nbytes, rbytes); in cmd_pread()
233 size_t nbytes; in cmd_readsym() local
244 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/lib/libbsdmalloc/common/
H A Dmalloc.bsd43.c97 malloc(size_t nbytes) in malloc() argument
142 if (nbytes <= (n = pagesz - sizeof (*op))) { in malloc()
150 while (nbytes > amt + n) { in malloc()
264 realloc(void *cp, size_t nbytes) in realloc() argument
273 return (malloc(nbytes)); in realloc()
292 if ((res = malloc(nbytes)) != NULL) in realloc()
293 (void) memmove(res, cp, nbytes); in realloc()
312 if (nbytes <= onb && nbytes > sz) { in realloc()
317 if ((res = malloc(nbytes)) == NULL) in realloc()
320 (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.c366 req_attrval.bufsize = (uint32_t)nbytes; in picl_get_propval()
379 if (ret->ret_attrval.nbytes > (uint32_t)nbytes) in picl_get_propval()
383 (size_t)ret->ret_attrval.nbytes); in picl_get_propval()
395 void *valbuf, size_t nbytes) in picl_get_propval_by_name() argument
419 if (ret->ret_attrvalbyname.nbytes > (uint32_t)nbytes) in picl_get_propval_by_name()
447 inargs->bufsize = (uint32_t)nbytes; in picl_set_propval()
448 if ((size_t)inargs->bufsize != nbytes) in picl_set_propval()
453 nbytes, NULL, 0, &ret_setattrval, in picl_set_propval()
469 void *valbuf, size_t nbytes) in picl_set_propval_by_name() argument
483 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