Lines Matching defs:smh
142 smb_mem_header_t *smh;
144 while ((smh = list_head(&sr->sr_storage)) != NULL)
145 smb_free(sr, ++smh, B_FALSE);
220 smb_mem_header_t *smh;
223 smh = kmem_zalloc(size + sizeof (smb_mem_header_t), KM_SLEEP);
225 smh = kmem_alloc(size + sizeof (smb_mem_header_t), KM_SLEEP);
226 smh->smh_sr = NULL;
227 bzero(&smh->smh_lnd, sizeof (smh->smh_lnd));
229 smh->smh_sr = sr;
230 smh->smh_size = size;
231 smh->smh_magic = SMB_SMH_MAGIC;
234 list_insert_tail(&sr->sr_storage, smh);
236 return (++smh);
251 smb_mem_header_t *smh;
254 smh = SMB_MEM2SMH(ptr);
255 SMB_SMH_VALID(smh);
256 ASSERT(sr == smh->smh_sr);
259 list_remove(&sr->sr_storage, smh);
262 bzero(ptr, smh->smh_size);
264 smh->smh_magic = 0;
265 kmem_free(smh, smh->smh_size + sizeof (smb_mem_header_t));
283 smb_mem_header_t *smh;
289 smh = SMB_MEM2SMH(ptr);
290 SMB_SMH_VALID(smh);
291 ASSERT(sr == smh->smh_sr);
297 if (smh->smh_size >= size) {
298 if ((zero) & (smh->smh_size > size))
299 bzero((caddr_t)ptr + size, smh->smh_size - size);
303 bcopy(ptr, new_ptr, smh->smh_size);
305 bzero((caddr_t)new_ptr + smh->smh_size, size - smh->smh_size);