/* Initialize in place a remote heap info block. This is needed to support operation very early in the startup of the kernel, when it is not yet safe to call kmalloc.  */
void rh_init(rh_info_t *info, unsigned int alignment, int max_blocks, rh_block_t *block)
/* Initialize in place a remote heap info block. This is needed to support operation very early in the startup of the kernel, when it is not yet safe to call kmalloc.  */
void rh_init(rh_info_t *info, unsigned int alignment, int max_blocks, rh_block_t *block)
{
	int i;
	rh_block_t *blk;
	if ((alignment & (alignment - 1)) != 0)
		return;
	info->alignment = alignment;
	info->block = block;
	info->max_blocks = max_blocks;
	info->empty_slots = max_blocks;
	info->flags = RHIF_STATIC_INFO | RHIF_STATIC_BLOCK;
	INIT_LIST_HEAD(&info->empty_list);
	INIT_LIST_HEAD(&info->free_list);
	INIT_LIST_HEAD(&info->taken_list);
	for (i = 0, blk = block; i < max_blocks; i++, blk++)
		list_add(&blk->list, &info->empty_list);
}