Author: blueswirl Date: 2007-07-29 22:20:46 +0200 (Sun, 29 Jul 2007) New Revision: 167
Modified: openbios-devel/arch/sparc32/lib.c openbios-devel/arch/sparc32/romvec.c Log: Maximally align allocations
Modified: openbios-devel/arch/sparc32/lib.c =================================================================== --- openbios-devel/arch/sparc32/lib.c 2007-07-20 11:23:30 UTC (rev 166) +++ openbios-devel/arch/sparc32/lib.c 2007-07-29 20:20:46 UTC (rev 167) @@ -72,8 +72,7 @@ if( !size ) return NULL;
- if( size & 3 ) - size += 4 - (size & 3); + size = (size + 7) & ~7; size += sizeof(alloc_desc_t);
/* look in the freelist */
Modified: openbios-devel/arch/sparc32/romvec.c =================================================================== --- openbios-devel/arch/sparc32/romvec.c 2007-07-20 11:23:30 UTC (rev 166) +++ openbios-devel/arch/sparc32/romvec.c 2007-07-29 20:20:46 UTC (rev 167) @@ -416,6 +416,7 @@ { static unsigned int next_free_address = 0xFFEDA000;
+ size = (size + 7) & ~7; totmap[0].num_bytes -= size; DPRINTF("obp_dumb_memalloc req 0x%x of %d at 0x%x\n", va, size, totmap[0].num_bytes);