diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2006-05-03 17:32:15 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2006-05-03 17:32:15 -0700 |
| commit | 28eecd8965aedbd75727fb0797a2e7033d5c54ee (patch) | |
| tree | 1cac9ffc5f7fe7fd82d59b4accd7b8cf85762f74 /com32/lib/malloc.c | |
| parent | f8c463722022008c8412a69f90576d2bf38818ed (diff) | |
| download | syslinux-28eecd8965aedbd75727fb0797a2e7033d5c54ee.tar.gz | |
Across-the-board stealth whitespace cleanup
Diffstat (limited to 'com32/lib/malloc.c')
| -rw-r--r-- | com32/lib/malloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c index e7a1cdc9..2f8362b4 100644 --- a/com32/lib/malloc.c +++ b/com32/lib/malloc.c @@ -41,14 +41,14 @@ static void __constructor init_memory_arena(void) if ( __stack_size == 0 || __stack_size > total_space >> 1 ) __stack_size = total_space >> 1; /* Half for the stack, half for the heap... */ - + if ( total_space < __stack_size + 4*sizeof(struct arena_header) ) __stack_size = total_space - 4*sizeof(struct arena_header); fp = (struct free_arena_header *)start; fp->a.type = ARENA_TYPE_FREE; fp->a.size = total_space - __stack_size; - + /* Insert into chains */ fp->a.next = fp->a.prev = &__malloc_head; fp->next_free = fp->prev_free = &__malloc_head; @@ -62,7 +62,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) struct free_arena_header *nfp, *na; fsize = fp->a.size; - + /* We need the 2* to account for the larger requirements of a free block */ if ( fsize >= size+2*sizeof(struct arena_header) ) { /* Bigger block than required -- split block */ @@ -79,7 +79,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) nfp->a.next = na; na->a.prev = nfp; fp->a.next = nfp; - + /* Replace current block on free chain */ nfp->next_free = fp->next_free; nfp->prev_free = fp->prev_free; @@ -93,7 +93,7 @@ static void *__malloc_from_block(struct free_arena_header *fp, size_t size) fp->next_free->prev_free = fp->prev_free; fp->prev_free->next_free = fp->next_free; } - + return (void *)(&fp->a + 1); } |
