j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2008-02-01 20:55:39 +0100 (Fri, 01 Feb 2008) New Revision: 184
Modified: openbios-devel/arch/sparc64/lib.c Log: Enforce malloc alignment
Modified: openbios-devel/arch/sparc64/lib.c =================================================================== --- openbios-devel/arch/sparc64/lib.c 2007-12-29 18:38:16 UTC (rev 183) +++ openbios-devel/arch/sparc64/lib.c 2008-02-01 19:55:39 UTC (rev 184) @@ -41,6 +41,12 @@ void *malloc(int size) { void *ret=(void *)0; + + if( !size ) + return NULL; + + size = (size + 7) & ~7; + if(memsize>=size) { memsize-=size; ret=memptr;