malloc.c
static void coalesce_if_necessary(union Header *block)
{
	union Header *succ;

	if (block == 0) {
		return;
	}
	succ = block->h.next;

	/* check whether successor exists and both block and successor are free */
	if (is_allocated(block) || succ == 0 || is_allocated(succ)) {
		return;
	}

	/* absorb successor into block */
	block->h.size += succ->h.size;

	/* splice successor out of the list */
	if (succ->h.next != 0) {
		/* update successor's successor to have block as its predecessor */
		succ->h.next->h.prev = block;
	} else {
		/* successor was the tail block, so block becomes tail */
		s_tail = block;
	}
	block->h.next = block->h.next->h.next;
}
/*
 * Coalesce given block with its successor if necesary.
 */
Coalesce given block with its successor if necesary.
Coalesce given block with its successor if necesary .
static void coalesce_if_necessary(union Header *block)
{
	union Header *succ;
	if (block == 0) {
		return;
	}
	succ = block->h.next;
	if (is_allocated(block) || succ == 0 || is_allocated(succ)) {
		return;
	}
	block->h.size += succ->h.size;
	if (succ->h.next != 0) {
		succ->h.next->h.prev = block;
	} else {
		s_tail = block;
	}
	block->h.next = block->h.next->h.next;
}
static void coalesce_if_necessary ( union Header * block ) { union Header * succ ; if ( block == 0 ) { return ; } succ = block -> h . next ; if ( is_allocated ( block ) || succ == 0 || is_allocated ( succ ) ) { return ; } block -> h . size += succ -> h . size ; if ( succ -> h . next != 0 ) { succ -> h . next -> h . prev = block ; } else { s_tail = block ; } block -> h . next = block -> h . next -> h . next ; }
Coalesce given block with its successor if necesary.
Coalesce given block with its successor if necesary .
/* check whether successor exists and both block and successor are free */ /* absorb successor into block */ /* splice successor out of the list */ /* update successor's successor to have block as its predecessor */ /* successor was the tail block, so block becomes tail */