Home | History | Annotate | Download | only in src

Lines Matching refs:blk

100 	struct os_mem_block *blk;
119 blk = kmalloc(total_size, flags);
120 if (!blk)
125 blk->f_free = (os_free)kfree;
136 blk = vmalloc(total_size);
137 if (!blk) {
141 blk->f_free = (os_free)vfree;
146 /*list_add(&blk->blk_list, &drv->mem_blocks);*/
147 blk->size = Size;
148 blk->signature = MEM_BLOCK_START;
149 *(__u32 *)((unsigned char *)blk + total_size - sizeof(__u32)) = MEM_BLOCK_END;
150 return (void *)((char *)blk + sizeof(struct os_mem_block));
219 struct os_mem_block *blk;
225 blk = (struct os_mem_block *)((char *)pMemPtr - sizeof(struct os_mem_block));
230 if (blk->signature != MEM_BLOCK_START)
233 __FUNCTION__, blk->signature);
236 *(char *)(&blk->signature) = '~';
237 if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block))
241 __FUNCTION__, blk->size);
244 os_profile (OsContext, 5, blk->size + sizeof(struct os_mem_block) + sizeof(__u32));
245 blk->f_free(blk);
298 struct os_mem_block *blk;
308 blk = kmalloc(total_size, flags | GFP_DMA);
309 if (!blk) {
313 blk->f_free = (os_free)kfree;
321 blk->size = Size;
322 blk->signature = MEM_BLOCK_START;
323 *(__u32 *)((unsigned char *)blk + total_size - sizeof(__u32)) = MEM_BLOCK_END;
325 return (void *)((char *)blk + sizeof(struct os_mem_block));
353 struct os_mem_block *blk;
359 blk = (struct os_mem_block *)((char *)pMem_ptr - sizeof(struct os_mem_block));
361 if (blk->signature != MEM_BLOCK_START)
364 __FUNCTION__, blk->signature);
367 *(char *)(&blk->signature) = '~';
368 if (*(__u32 *)((unsigned char *)blk + blk->size + sizeof(struct os_mem_block))
372 __FUNCTION__, blk->size);
375 blk->f_free(blk);