Lines Matching refs:size
217 ((char *)_nsc_rmhdr_ptr + _nsc_rmhdr_ptr->size);
345 size_t size;
353 size = sizeof (nsc_rmhdr_t) +
356 size = (size + _NSC_GLALIGN) & ~_NSC_GLALIGN;
357 bzero(_nsc_rm_base, size);
361 hdr->size = size;
374 size, nsc_cm_errhdlr) < 0)
397 _nsc_rm_size - hdr->size, hdr->size)) {
405 (void) nsc_kmem_alloc(hdr->size, 0, _nsc_rmhdr_mem);
425 int size = sizeof (nsc_rmhdr_t) +
428 size = (size + _NSC_GLALIGN) & ~_NSC_GLALIGN;
429 return (size);
435 * nsc_kmem_alloc (size_t size, int flag, nsc_mem_t *mem)
450 nsc_kmem_alloc(size_t size, int flag, nsc_mem_t *mem)
457 if ((vp = _nsc_mem_alloc(&size, flag, mem)) == NULL)
463 mem->used += size;
464 mem->pages += btopr(size);
488 * size is updated to reflect the header.
497 size_t size = *sizep;
504 size += sizeof (nsc_mem_t *);
509 vp = kmem_alloc(size, flag);
513 *sizep = size;
523 * nsc_kmem_free (void *addr, size_t size)
533 nsc_kmem_free(void *addr, size_t size)
545 rc = _nsc_rm_free(addr, size);
547 rc = _nsc_mem_free(addr, size);
556 * _nsc_mem_free (void *addr, size_t size)
564 _nsc_mem_free(void *addr, size_t size)
569 size += sizeof (nsc_mem_t *);
585 mp->used -= size;
586 mp->pages -= btopr(size);
592 kmem_free(addr, size);
600 * nsc_kmem_zalloc(size_t size, int flags, nsc_mem_t *mem)
607 nsc_kmem_zalloc(size_t size, int flag, nsc_mem_t *mem)
609 void *vp = nsc_kmem_alloc(size, flag, mem);
612 bzero((char *)vp, size);
621 * Access size information for category.
683 * _nsc_global_zero (ulong_t offset, size_t size)
694 _nsc_global_zero(ulong_t offset, size_t size)
701 for (i = 0; i < (int)(size / ZSIZE); ++i) {
713 size % ZSIZE,
721 bzero(_nsc_rm_base + offset, size);
740 size_t avail, size = (*sizep);
760 size = (size + _NSC_GLALIGN) & ~_NSC_GLALIGN;
769 mem->name, size, _nsc_global_zero);
777 if (avail && avail != size) {
778 size = avail;
786 size, _nsc_rm_avail(mem));
790 _nsc_mark_pages(_nsc_rm_base + offset, size, 1);
804 (*sizep) = size;
811 * _nsc_rm_free (void *addr, size_t size)
818 _nsc_rm_free(void *addr, size_t size)
835 mp->used -= size;
836 mp->pages -= btopr(size);
847 _nsc_mark_pages(addr, size, 0);
861 * allocated. Returns the size of the region if it already
868 size_t size;
873 if ((size = _nsc_rmmap_size(_nsc_global_map, mem->name)) != 0)
874 return (size);
902 if (copyout(&_nsc_rmhdr_ptr->size, arg,
903 sizeof (_nsc_rmhdr_ptr->size)) < 0)
913 size_t size;
918 size = _nsc_rmhdr_ptr->size;
920 if (copyout(_nsc_rmhdr_ptr, arg, size) < 0)
926 if ((taddr = kmem_alloc(size, KM_NOSLEEP)) == NULL)
929 if (copyout(taddr, (char *)arg + size, size) < 0) {
930 kmem_free(taddr, size);
934 kmem_free(taddr, size);