/* create a new memory block with the given size the block is linked next to prev  */
struct snd_util_memblk* __snd_util_memblk_new(struct snd_util_memhdr *hdr, unsigned int units, struct list_head *prev)
/* create a new memory block with the given size the block is linked next to prev  */
struct snd_util_memblk* __snd_util_memblk_new(struct snd_util_memhdr *hdr, unsigned int units, struct list_head *prev)
{
	struct snd_util_memblk *blk;
	blk = kmalloc(sizeof(struct snd_util_memblk) + hdr->block_extra_size,
		      GFP_KERNEL);
	if (blk == NULL)
		return NULL;
	if (prev == &hdr->block)
		blk->offset = 0;
	else {
		struct snd_util_memblk *p = get_memblk(prev);
		blk->offset = p->offset + p->size;
	}
	blk->size = units;
	list_add(&blk->list, prev);
	hdr->nblocks++;
	hdr->used += units;
	return blk;
}