/titanic_41/usr/src/cmd/mdb/common/mdb/ |
H A D | mdb_umem.c | 65 mdb_umem_handler(size_t nbytes, size_t align, uint_t flags) in mdb_umem_handler() argument 79 (ulong_t)nbytes); in mdb_umem_handler() 98 (ulong_t)nbytes); in mdb_umem_handler() 106 ptr = memalign(align, nbytes); in mdb_umem_handler() 108 ptr = malloc(nbytes); in mdb_umem_handler() 128 die("failed to allocate %lu bytes -- terminating\n", (ulong_t)nbytes); in mdb_umem_handler() 136 mdb_umem_gc_enter(void *ptr, size_t nbytes) in mdb_umem_gc_enter() argument 141 blkp->blk_size = nbytes; in mdb_umem_gc_enter() 169 mdb_alloc_align(size_t nbytes, size_t align, uint_t flags) in mdb_alloc_align() argument 173 if (nbytes == 0) in mdb_alloc_align() [all …]
|
H A D | mdb_value.c | 66 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 D | mdb_fdio.c | 57 fdio_read(mdb_io_t *io, void *buf, size_t nbytes) in fdio_read() argument 62 return (read(fdp->fd_fd, buf, nbytes)); in fdio_read() 64 return (IOP_READ(io->io_next, buf, nbytes)); in fdio_read() 68 fdio_write(mdb_io_t *io, const void *buf, size_t nbytes) in fdio_write() argument 73 return (write(fdp->fd_fd, buf, nbytes)); in fdio_write() 75 return (IOP_WRITE(io->io_next, buf, nbytes)); in fdio_write() 178 fdio_bdev_read(mdb_io_t *io, void *buf, size_t nbytes) in fdio_bdev_read() argument 181 ssize_t resid = nbytes; in fdio_bdev_read() 186 return (IOP_READ(io->io_next, buf, nbytes)); in fdio_bdev_read() 205 if (resid == nbytes && nbytes != 0) in fdio_bdev_read() [all …]
|
H A D | mdb_modapi.c | 57 mdb_vread(void *buf, size_t nbytes, uintptr_t addr) in mdb_vread() argument 59 ssize_t rbytes = mdb_tgt_vread(mdb.m_target, buf, nbytes, addr); in mdb_vread() 61 if (rbytes > 0 && rbytes < nbytes) in mdb_vread() 62 return (set_errbytes(rbytes, nbytes)); in mdb_vread() 68 mdb_vwrite(const void *buf, size_t nbytes, uintptr_t addr) in mdb_vwrite() argument 70 return (mdb_tgt_vwrite(mdb.m_target, buf, nbytes, addr)); in mdb_vwrite() 74 mdb_aread(void *buf, size_t nbytes, uintptr_t addr, void *as) in mdb_aread() argument 76 ssize_t rbytes = mdb_tgt_aread(mdb.m_target, as, buf, nbytes, addr); in mdb_aread() 78 if (rbytes > 0 && rbytes < nbytes) in mdb_aread() 79 return (set_errbytes(rbytes, nbytes)); in mdb_aread() [all …]
|
H A D | mdb_rawfile.c | 112 rf_read(mdb_io_t *io, void *buf, size_t nbytes, uint64_t addr) in rf_read() argument 122 if ((rbytes = IOP_READ(io, buf, nbytes)) == 0) in rf_read() 129 rf_write(mdb_io_t *io, const void *buf, size_t nbytes, uint64_t addr) in rf_write() argument 137 return (IOP_WRITE(io, buf, nbytes)); in rf_write() 175 rf_vread(mdb_tgt_t *t, void *buf, size_t nbytes, uintptr_t addr) in rf_vread() argument 178 return (rf_read(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vread() 180 return (rf_read(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vread() 184 rf_vwrite(mdb_tgt_t *t, const void *buf, size_t nbytes, uintptr_t addr) in rf_vwrite() argument 187 return (rf_write(RF_CORE(t->t_data), buf, nbytes, addr)); in rf_vwrite() 189 return (rf_write(RF_OBJECT(t->t_data), buf, nbytes, addr)); in rf_vwrite() [all …]
|
/titanic_41/usr/src/psm/stand/boot/common/ |
H A D | heap_kmem.c | 123 void kmem_free(void *ptr, size_t nbytes); 150 size_t nbytes; member 441 kmem_alloc(size_t nbytes, int kmflag) in kmem_alloc() argument 452 printf("kmem_alloc(nbytes 0x%lx)\n", nbytes); in kmem_alloc() 455 if (nbytes == 0) { in kmem_alloc() 460 if (nbytes < SMALLEST_BLK) { in kmem_alloc() 461 printf("illegal kmem_alloc call for %lx bytes\n", nbytes); in kmem_alloc() 471 if (mweight(kmem_info.free_root) <= nbytes) { in kmem_alloc() 475 if (!morecore(nbytes)) { in kmem_alloc() 476 printf("kmem_alloc failed, nbytes %lx\n", nbytes); in kmem_alloc() [all …]
|
/titanic_41/usr/src/cmd/fm/modules/common/eversholt/ |
H A D | alloc.c | 90 alloc_malloc(size_t nbytes, const char *fname, int line) in alloc_malloc() argument 94 ASSERT(nbytes > 0); in alloc_malloc() 96 retval = fmd_hdl_alloc(Hdl, nbytes + HDRSIZ, FMD_SLEEP); 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() 119 alloc_realloc(void *ptr, size_t nbytes, const char *fname, int line) in alloc_realloc() argument 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 [all …]
|
/titanic_41/usr/src/cmd/fm/eversholt/common/ |
H A D | alloc.h | 40 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 D | alloc.c | 70 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()
|
/titanic_41/usr/src/lib/libbc/libc/gen/common/ |
H A D | malloc.c | 422 malloc(uint nbytes) in malloc() argument 443 nbytes += ALIGNSIZ; in malloc() 444 if (nbytes < SMALLEST_BLK) { in malloc() 445 nbytes = SMALLEST_BLK; in malloc() 447 nbytes = roundup(nbytes, ALIGNSIZ); in malloc() 455 if (weight(_root) < nbytes) { in malloc() 459 if(!morecore(nbytes)) in malloc() 476 while (left_weight >= nbytes || right_weight >= nbytes) { in malloc() 478 if (left_weight >= nbytes) { in malloc() 486 if (right_weight >= nbytes) { in malloc() [all …]
|
H A D | memalign.c | 56 memalign(align, nbytes) in memalign() argument 58 uint nbytes; 72 if (nbytes == 0 || misaligned(align)) { 83 nbytes = roundup(nbytes, ALIGNSIZ); 84 reqsize = nbytes + align + SMALLEST_BLK; 130 nbytes += ALIGNSIZ; 131 frag_size = blksize - nbytes; 136 blk = nextblk(aligned_blk, nbytes);
|
/titanic_41/usr/src/uts/common/fs/ufs/ |
H A D | ufs_directio.c | 131 size_t nbytes; member 264 directio_start(struct ufsvfs *ufsvfsp, struct inode *ip, size_t nbytes, in directio_start() argument 286 dbp->nbytes = nbytes; in directio_start() 290 bp->b_bcount = nbytes; in directio_start() 304 ufs_directio_kstats.nread.value.ui64 += nbytes; in directio_start() 308 ufs_directio_kstats.nwritten.value.ui64 += nbytes; in directio_start() 354 size_t nbytes; in ufs_directio_write() local 438 nbytes = uio->uio_iovcnt; in ufs_directio_write() 439 while (nbytes--) { in ufs_directio_write() 669 nbytes = pglck_len; in ufs_directio_write() [all …]
|
/titanic_41/usr/src/cmd/lvm/metassist/layout/ |
H A D | layout_messages.c | 48 uint64_t nbytes) in print_layout_volume_msg() argument 52 (void) bytes_to_sizestr(nbytes, &spstr, universal_units, B_FALSE); in print_layout_volume_msg() 236 uint64_t nbytes) in print_hba_insufficient_space_msg() argument 240 (void) bytes_to_sizestr(nbytes, &spstr, universal_units, B_FALSE); in print_hba_insufficient_space_msg() 260 uint64_t nbytes) in print_insufficient_capacity_msg() argument 264 (void) bytes_to_sizestr(nbytes, &spstr, universal_units, B_FALSE); in print_insufficient_capacity_msg() 282 uint64_t nbytes, in print_layout_submirrors_msg() argument 287 (void) bytes_to_sizestr(nbytes, &spstr, universal_units, B_FALSE); in print_layout_submirrors_msg() 332 uint64_t nbytes) in print_populate_volume_msg() argument 336 (void) bytes_to_sizestr(nbytes, &spstr, universal_units, B_FALSE); in print_populate_volume_msg() [all …]
|
/titanic_41/usr/src/lib/libwanbootutil/common/ |
H A D | wbio.c | 42 ssize_t nbytes; in wbio_nwrite() local 45 for (nwritten = 0; nwritten < buflen; nwritten += nbytes) { in wbio_nwrite() 46 nbytes = write(fd, &buf[nwritten], buflen - nwritten); in wbio_nwrite() 47 if (nbytes <= 0) in wbio_nwrite() 62 ssize_t nbytes; in wbio_nread() local 65 for (nread = 0; nread < buflen; nread += nbytes) { in wbio_nread() 66 nbytes = read(fd, &buf[nread], buflen - nread); in wbio_nread() 67 if (nbytes <= 0) in wbio_nread()
|
/titanic_41/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/ |
H A D | bt_split.c | 99 u_int32_t n, nbytes, nksize; local 187 nbytes = NBINTERNAL(bi->ksize); 191 nbytes = NBINTERNAL(bl->ksize); 201 if (n < nbytes) { 203 bt_pfxsaved += nbytes - n; 205 nbytes = n; 213 nbytes = NRINTERNAL; 220 if (h->upper - h->lower < nbytes + sizeof(indx_t)) { 223 bt_root(t, h, &l, &r, &skip, nbytes) : 224 bt_page(t, h, &l, &r, &skip, nbytes); [all …]
|
/titanic_41/usr/src/uts/common/inet/ |
H A D | tunables.c | 107 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 …]
|
/titanic_41/usr/src/cmd/sh/ |
H A D | blok.c | 69 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 …]
|
/titanic_41/usr/src/lib/libproc/common/ |
H A D | Pscantext.c | 56 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 …]
|
/titanic_41/usr/src/lib/libc/port/gen/ |
H A D | memalign.c | 62 memalign(size_t align, size_t nbytes) in memalign() argument 82 if (nbytes == 0 || _misaligned(align) || align == 0 || in memalign() 99 if (nbytes > MAX_MALLOC) { in memalign() 103 ROUND(nbytes); in memalign() 104 if (nbytes < MINSIZE) in memalign() 105 nbytes = MINSIZE; in memalign() 109 reqsize = nbytes + align + (MINSIZE + WORDSIZE); in memalign() 112 if (reqsize < nbytes) { in memalign() 170 frag_size = blksize - nbytes; in memalign() 176 SIZE(aligned_blk) = nbytes; in memalign()
|
/titanic_41/usr/src/lib/fm/libdiskstatus/common/ |
H A D | ds_scsi_uscsi.c | 1204 int nbytes; in uscsi_mode_sense() local 1215 nbytes = sizeof (struct scsi_ms_header) + page_size; in uscsi_mode_sense() 1216 mode_sense_buf = alloca((uint_t)nbytes); in uscsi_mode_sense() 1221 (void) memset(mode_sense_buf, 0, nbytes); in uscsi_mode_sense() 1225 FORMG0COUNT(&cdb, (uchar_t)nbytes); in uscsi_mode_sense() 1230 ucmd.uscsi_buflen = nbytes; in uscsi_mode_sense() 1237 ddump("RAW MODE SENSE BUFFER", mode_sense_buf, nbytes); in uscsi_mode_sense() 1251 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense() 1282 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense() 1296 ddump("Mode sense:", mode_sense_buf, nbytes); in uscsi_mode_sense() [all …]
|
/titanic_41/usr/src/lib/libcmdutils/common/ |
H A D | writefile.c | 51 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 …]
|
/titanic_41/usr/src/cmd/mdb/common/modules/mdb_test/ |
H A D | mdb_test.c | 177 size_t nbytes; in cmd_vread() local 185 nbytes = (size_t)mdb_strtoull(argv->a_un.a_str); in cmd_vread() 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 213 nbytes = (size_t)mdb_strtoull(argv->a_un.a_str); in cmd_pread() 215 nbytes = (size_t)argv->a_un.a_val; in cmd_pread() 217 buf = mdb_alloc(nbytes, UM_SLEEP | UM_GC); in cmd_pread() [all …]
|
/titanic_41/usr/src/lib/libipmp/common/ |
H A D | ipmp_mpathd.c | 165 ssize_t nbytes; in ipmp_write() local 168 for (nwritten = 0; nwritten < buflen; nwritten += nbytes) { in ipmp_write() 169 nbytes = write(fd, &buf[nwritten], buflen - nwritten); in ipmp_write() 170 if (nbytes == -1) in ipmp_write() 172 if (nbytes == 0) { in ipmp_write() 213 ssize_t nbytes = 0; /* total bytes processed */ in ipmp_read() local 217 while (nbytes < buflen) { in ipmp_read() 253 prbytes = read(fd, (caddr_t)buffer + nbytes, buflen - nbytes); in ipmp_read() 259 nbytes += prbytes; in ipmp_read() 262 return (nbytes == buflen ? IPMP_SUCCESS : IPMP_FAILURE); in ipmp_read()
|
/titanic_41/usr/src/common/smbsrv/ |
H A D | smb_utf8.c | 119 smb_mbtowc(smb_wchar_t *wcharp, const char *mbchar, size_t nbytes) in smb_mbtowc() argument 211 smb_wcstombs(char *mbstring, const smb_wchar_t *wcstring, size_t nbytes) in smb_wcstombs() argument 222 while (nbytes > MTS_MB_CHAR_MAX) { in smb_wcstombs() 231 nbytes -= len; in smb_wcstombs() 234 while (wide_char && nbytes) { in smb_wcstombs() 236 if ((len = smb_wctomb(buf, wide_char)) > nbytes) { in smb_wcstombs() 243 nbytes -= len; in smb_wcstombs() 285 size_t nbytes; in smb_sbequiv_strlen() local 289 nbytes = smb_mbtowc(&wide_char, mbs, MTS_MB_CHAR_MAX); in smb_sbequiv_strlen() 290 if (nbytes == ((size_t)-1)) in smb_sbequiv_strlen() [all …]
|
/titanic_41/usr/src/lib/libbsdmalloc/common/ |
H A D | malloc.bsd43.c | 97 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()
|