From 0604d41c87df06039d8d6effbdff790a2e329a93 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Jul 2009 06:58:45 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/resp/tuplr@172 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/tlsf.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/tlsf.c b/src/tlsf.c index 60ed064..75fd4e4 100644 --- a/src/tlsf.c +++ b/src/tlsf.c @@ -438,7 +438,7 @@ tlsf_add_area(tlsf_t* tlsf, void *area, size_t area_size) b1 = GET_NEXT_BLOCK(ib1->ptr.buffer, ib1->size & BLOCK_SIZE); lb1 = ptr->end; - /* Merging the new area with the next physically contigous one */ + /* Merge the new area with the next physically contiguous one */ if ((unsigned long) ib1 == (unsigned long) lb0 + BHDR_OVERHEAD) { if (tlsf->area_head == ptr) { tlsf->area_head = ptr->next; @@ -449,8 +449,9 @@ tlsf_add_area(tlsf_t* tlsf, void *area, size_t area_size) } b0->size = - ROUNDDOWN_SIZE((b0->size & BLOCK_SIZE) + - (ib1->size & BLOCK_SIZE) + 2 * BHDR_OVERHEAD) | USED_BLOCK | PREV_USED; + ROUNDDOWN_SIZE((b0->size & BLOCK_SIZE) + (ib1->size & BLOCK_SIZE) + + 2 * BHDR_OVERHEAD) + | USED_BLOCK | PREV_USED; b1->prev_hdr = b0; lb0 = lb1; @@ -458,7 +459,7 @@ tlsf_add_area(tlsf_t* tlsf, void *area, size_t area_size) continue; } - /* Merge the new area with the previous physically contigous one */ + /* Merge the new area with the previous physically contiguous one */ if ((unsigned long) lb1->ptr.buffer == (unsigned long) ib0) { if (tlsf->area_head == ptr) { tlsf->area_head = ptr->next; @@ -469,8 +470,9 @@ tlsf_add_area(tlsf_t* tlsf, void *area, size_t area_size) } lb1->size = - ROUNDDOWN_SIZE((b0->size & BLOCK_SIZE) + - (ib0->size & BLOCK_SIZE) + 2 * BHDR_OVERHEAD) | USED_BLOCK | (lb1->size & PREV_STATE); + ROUNDDOWN_SIZE((b0->size & BLOCK_SIZE) + (ib0->size & BLOCK_SIZE) + + 2 * BHDR_OVERHEAD) + | USED_BLOCK | (lb1->size & PREV_STATE); next_b = GET_NEXT_BLOCK(lb1->ptr.buffer, lb1->size & BLOCK_SIZE); next_b->prev_hdr = lb1; b0 = lb1; -- cgit v1.2.1