Home
last modified time | relevance | path

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

12345678910>>...15

/illumos-gate/usr/src/cmd/mdb/common/mdb/
H A Dmdb_umem.c63 mdb_umem_handler(size_t nbytes, size_t align, uint_t flags) in mdb_umem_handler() argument
77 (ulong_t)nbytes); in mdb_umem_handler()
96 (ulong_t)nbytes); in mdb_umem_handler()
104 ptr = memalign(align, nbytes); in mdb_umem_handler()
106 ptr = malloc(nbytes); in mdb_umem_handler()
126 die("failed to allocate %lu bytes -- terminating\n", (ulong_t)nbytes); in mdb_umem_handler()
134 mdb_umem_gc_enter(void *ptr, size_t nbytes) in mdb_umem_gc_enter() argument
139 blkp->blk_size = nbytes; in mdb_umem_gc_enter()
167 mdb_alloc_align(size_t nbytes, size_t align, uint_t flags) in mdb_alloc_align() argument
170 size_t obytes = nbytes; in mdb_alloc_align()
[all …]
H A Dmdb_fdio.c55 fdio_read(mdb_io_t *io, void *buf, size_t nbytes) in fdio_read() argument
60 return (read(fdp->fd_fd, buf, nbytes)); in fdio_read()
62 return (IOP_READ(io->io_next, buf, nbytes)); in fdio_read()
66 fdio_write(mdb_io_t *io, const void *buf, size_t nbytes) in fdio_write() argument
71 return (write(fdp->fd_fd, buf, nbytes)); in fdio_write()
73 return (IOP_WRITE(io->io_next, buf, nbytes)); in fdio_write()
188 fdio_bdev_read(mdb_io_t *io, void *buf, size_t nbytes) in fdio_bdev_read() argument
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()
[all …]
H A Dmdb_modapi.c168 mdb_vread(void *buf, size_t nbytes, uintptr_t addr) in mdb_vread() argument
170 ssize_t rbytes = mdb_tgt_vread(mdb.m_target, buf, nbytes, addr); in mdb_vread()
172 if (rbytes > 0 && rbytes < nbytes) in mdb_vread()
173 return (set_errbytes(rbytes, nbytes)); in mdb_vread()
179 mdb_vwrite(const void *buf, size_t nbytes, uintptr_t addr) in mdb_vwrite() argument
181 return (mdb_tgt_vwrite(mdb.m_target, buf, nbytes, addr)); in mdb_vwrite()
185 mdb_aread(void *buf, size_t nbytes, uintptr_t addr, void *as) in mdb_aread() argument
187 ssize_t rbytes = mdb_tgt_aread(mdb.m_target, as, buf, nbytes, addr); in mdb_aread()
189 if (rbytes > 0 && rbytes < nbytes) in mdb_aread()
190 return (set_errbytes(rbytes, nbytes)); in mdb_aread()
[all …]
H A Dmdb_value.c67 value_read(mdb_tgt_t *t, void *dst, size_t nbytes, uintptr_t addr) in value_read() argument
80 size = nbytes; in value_read()
83 nbytes = MIN(size, nbytes); in value_read()
94 if (off + nbytes > sizeof (uintmax_t)) in value_read()
95 nbytes = sizeof (uintmax_t) - off; in value_read()
97 if (nbytes != 0) in value_read()
98 bcopy(src + off, dst, nbytes); in value_read()
100 return (nbytes); in value_read()
105 value_write(mdb_tgt_t *t, const void *buf, size_t nbytes, uintptr_t addr) in value_write() argument
107 return (nbytes); /* We allow writes to silently fail */ in value_write()
/illumos-gate/usr/src/psm/stand/boot/common/
H A Dheap_kmem.c121 void kmem_free(void *ptr, size_t nbytes);
148 size_t nbytes; member
439 kmem_alloc(size_t nbytes, int kmflag) in kmem_alloc() argument
450 printf("kmem_alloc(nbytes 0x%lx)\n", nbytes); in kmem_alloc()
453 if (nbytes == 0) { in kmem_alloc()
458 if (nbytes < SMALLEST_BLK) { in kmem_alloc()
459 printf("illegal kmem_alloc call for %lx bytes\n", nbytes); in kmem_alloc()
469 if (mweight(kmem_info.free_root) <= nbytes) { in kmem_alloc()
473 if (!morecore(nbytes)) { in kmem_alloc()
474 printf("kmem_alloc failed, nbytes %lx\n", nbytes); in kmem_alloc()
[all …]
/illumos-gate/usr/src/cmd/fm/modules/common/eversholt/
H A Dalloc.c88 alloc_malloc(size_t nbytes, const char *fname, int line) in alloc_malloc() argument
92 ASSERT(nbytes > 0); in alloc_malloc()
94 retval = fmd_hdl_alloc(Hdl, nbytes + HDRSIZ, FMD_SLEEP); 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()
117 alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line) in alloc_realloc() argument
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
[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.c65 fmemopen_read(FILE *iop, char *buf, size_t nbytes) in fmemopen_read() argument
69 nbytes = MIN(nbytes, fmp->fmo_lsize - fmp->fmo_pos); in fmemopen_read()
70 if (nbytes == 0) { in fmemopen_read()
74 (void) memcpy(buf, fmp->fmo_buf, nbytes); in fmemopen_read()
75 fmp->fmo_pos += nbytes; in fmemopen_read()
77 return (nbytes); in fmemopen_read()
81 fmemopen_write(FILE *iop, const char *buf, size_t nbytes) in fmemopen_write() argument
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()
[all …]
/illumos-gate/usr/src/uts/common/fs/ufs/
H A Dufs_directio.c132 size_t nbytes; member
247 directio_start(struct ufsvfs *ufsvfsp, struct inode *ip, size_t nbytes, in directio_start() argument
269 dbp->nbytes = nbytes; in directio_start()
273 bp->b_bcount = nbytes; in directio_start()
287 ufs_directio_kstats.nread.value.ui64 += nbytes; in directio_start()
291 ufs_directio_kstats.nwritten.value.ui64 += nbytes; in directio_start()
337 size_t nbytes; in ufs_directio_write() local
421 nbytes = uio->uio_iovcnt; in ufs_directio_write()
422 while (nbytes--) { in ufs_directio_write()
652 nbytes = pglck_len; in ufs_directio_write()
[all …]
/illumos-gate/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/
H A Dbt_split.c97 u_int32_t n, nbytes, nksize; local
185 nbytes = NBINTERNAL(bi->ksize);
189 nbytes = NBINTERNAL(bl->ksize);
199 if (n < nbytes) {
201 bt_pfxsaved += nbytes - n;
203 nbytes = n;
211 nbytes = NRINTERNAL;
218 if (h->upper - h->lower < nbytes + sizeof(indx_t)) {
221 bt_root(t, h, &l, &r, &skip, nbytes) :
222 bt_page(t, h, &l, &r, &skip, nbytes);
[all …]
/illumos-gate/usr/src/uts/common/inet/
H A Dtunables.c107 size_t nbytes; in mod_get_boolean() local
111 nbytes = snprintf(pval, psize, "%u", prop_perm2const(pinfo)); in mod_get_boolean()
113 nbytes = snprintf(pval, psize, "%u,%u", B_FALSE, B_TRUE); in mod_get_boolean()
115 nbytes = snprintf(pval, psize, "%u", pinfo->prop_def_bval); in mod_get_boolean()
117 nbytes = snprintf(pval, psize, "%u", pinfo->prop_cur_bval); in mod_get_boolean()
118 if (nbytes >= psize) in mod_get_boolean()
196 size_t nbytes; in mod_get_uint32() local
200 nbytes = snprintf(pval, psize, "%u", prop_perm2const(pinfo)); in mod_get_uint32()
202 nbytes = snprintf(pval, psize, "%u-%u", in mod_get_uint32()
205 nbytes = snprintf(pval, psize, "%u", pinfo->prop_def_uval); in mod_get_uint32()
[all …]
/illumos-gate/usr/src/cmd/sh/
H A Dblok.c69 alloc(size_t nbytes) in alloc() argument
71 size_t rbytes = round(nbytes + ALIGNSIZ, ALIGNSIZ); in alloc()
313 realloc(pp, nbytes) in realloc() argument
315 size_t nbytes;
318 realloc(pp, nbytes)
320 size_t nbytes;
327 return (alloc(nbytes));
328 if ((nbytes == 0) && (pp != NULL))
333 if (blen < nbytes) { /* need to grow */
334 q = alloc(nbytes);
[all …]
/illumos-gate/usr/src/lib/fm/libdiskstatus/common/
H A Dds_scsi_uscsi.c1203 int nbytes; in uscsi_mode_sense() local
1214 nbytes = sizeof (struct scsi_ms_header) + page_size; in uscsi_mode_sense()
1215 mode_sense_buf = alloca((uint_t)nbytes); in uscsi_mode_sense()
1220 (void) memset(mode_sense_buf, 0, nbytes); in uscsi_mode_sense()
1224 FORMG0COUNT(&cdb, (uchar_t)nbytes); in uscsi_mode_sense()
1229 ucmd.uscsi_buflen = nbytes; in uscsi_mode_sense()
1236 ddump("RAW MODE SENSE BUFFER", mode_sense_buf, nbytes); in uscsi_mode_sense()
1255 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense()
1263 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense()
1301 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense()
[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.c386 note_pstatus(struct ps_prochandle *P, size_t nbytes) in note_pstatus() argument
394 if (nbytes < sizeof (pstatus32_t) || in note_pstatus()
402 if (nbytes < sizeof (pstatus_t) || in note_pstatus()
417 note_lwpstatus(struct ps_prochandle *P, size_t nbytes) in note_lwpstatus() argument
428 if (nbytes < sizeof (lwpstatus32_t) || in note_lwpstatus()
435 if (nbytes < sizeof (lwpstatus_t) || in note_lwpstatus()
498 note_linux_psinfo(struct ps_prochandle *P, size_t nbytes) in note_linux_psinfo() argument
505 if (nbytes < sizeof (p32) || in note_linux_psinfo()
511 if (nbytes < sizeof (p64) || in note_linux_psinfo()
615 note_linux_prstatus(struct ps_prochandle *P, size_t nbytes) in note_linux_prstatus() argument
[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
183 nbytes = (size_t)mdb_strtoull(argv->a_un.a_str); in cmd_vread()
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
211 nbytes = (size_t)mdb_strtoull(argv->a_un.a_str); in cmd_pread()
213 nbytes = (size_t)argv->a_un.a_val; in cmd_pread()
215 buf = mdb_alloc(nbytes, UM_SLEEP | UM_GC); in cmd_pread()
[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.c113 smb_mbtowc(uint32_t *wcharp, const char *mbchar, size_t nbytes) in smb_mbtowc() argument
126 count = u8_validate((char *)mbchar, nbytes, NULL, 0, &err); in smb_mbtowc()
193 smb_wcstombs(char *mbs, const smb_wchar_t *wcs, size_t nbytes) in smb_wcstombs() argument
200 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()
[all …]
/illumos-gate/usr/src/lib/libpicl/
H A Dpicl.c354 picl_get_propval(picl_prophdl_t proph, void *valbuf, size_t nbytes) in picl_get_propval() argument
364 req_attrval.bufsize = (uint32_t)nbytes; in picl_get_propval()
365 if ((size_t)req_attrval.bufsize != nbytes) in picl_get_propval()
367 outargs = alloca(sizeof (picl_retattrval_t) + nbytes); in picl_get_propval()
370 NULL, 0, outargs, sizeof (picl_retattrval_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
404 req_attrvalbyname.bufsize = (uint32_t)nbytes; in picl_get_propval_by_name()
405 if ((size_t)req_attrvalbyname.bufsize != nbytes) in picl_get_propval_by_name()
[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/uts/common/fs/smbsrv/
H A Dsmb_mbuf_util.c144 smb_mbuf_get(uchar_t *buf, int nbytes) in smb_mbuf_get() argument
151 while (nbytes) { in smb_mbuf_get()
152 count = (nbytes > MCLBYTES) ? MCLBYTES : nbytes; in smb_mbuf_get()
153 nbytes -= count; in smb_mbuf_get()
245 smb_mbuf_alloc_chain(int nbytes) in smb_mbuf_alloc_chain() argument
251 ASSERT(nbytes > 0); in smb_mbuf_alloc_chain()
253 while (nbytes >= kmem_max_cached) { in smb_mbuf_alloc_chain()
261 nbytes -= len; in smb_mbuf_alloc_chain()
264 if (nbytes > MCLBYTES) { in smb_mbuf_alloc_chain()
265 len = nbytes; in smb_mbuf_alloc_chain()
[all …]

12345678910>>...15