[coreboot] New patch to review for coreboot: 104f855 malloc/memalign: Remove unneeded linker check

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Mon Jul 23 23:20:43 CEST 2012


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1275

-gerrit

commit 104f85537f63a2ace2176c70cdc1b6a4ae6f2334
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Wed Jun 6 13:43:52 2012 -0700

    malloc/memalign: Remove unneeded linker check
    
    This check got in the code when some Linux distros shipped broken linkers
    around 1999.
    Since then, the code around that check was changed, and it does not make
    sense anymore to have this check.
    
    Change-Id: I37c6b690d72f55c18ba4c34e8541a6a441e5e67a
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 src/lib/malloc.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/lib/malloc.c b/src/lib/malloc.c
index bf8a15a..d2011a1 100644
--- a/src/lib/malloc.c
+++ b/src/lib/malloc.c
@@ -21,10 +21,6 @@ void *memalign(size_t boundary, size_t size)
 	MALLOCDBG("%s Enter, boundary %zu, size %zu, free_mem_ptr %p\n",
 		__func__, boundary, size, free_mem_ptr);
 
-	/* Overzealous linker check */
-	if (free_mem_ptr <= 0)
-		die("Error! memalign: Free_mem_ptr <= 0");
-
 	free_mem_ptr = (void *)ALIGN((unsigned long)free_mem_ptr, boundary);
 
 	p = free_mem_ptr;




More information about the coreboot mailing list