From ca7858bb8856f1afcc537f39763b7c951e5068d3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 26 Jul 2000 19:28:11 +0000 Subject: Port of RTEMS to the Texas Instruments C3x/C4x DSP families including a BSP (c4xsim) supporting the simulator included with gdb. This port was done by Joel Sherrill and Jennifer Averett of OAR Corporation. Also included with this port is a space/time optimization to eliminate FP context switch management on CPUs without hardware or software FP. An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8) on this CPU. This required addressing alignment checks and assumptions as well as fixing code that assumed sizeof(unsigned32) == 4. --- c/src/lib/libc/malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/src/lib/libc') diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c index 0396b051be..d3121f90b4 100644 --- a/c/src/lib/libc/malloc.c +++ b/c/src/lib/libc/malloc.c @@ -82,9 +82,9 @@ void RTEMS_Malloc_Initialize( /* DOES NOT RETURN!!! */ } - if (u32_address & (CPU_ALIGNMENT-1)) { + if (u32_address & (CPU_HEAP_ALIGNMENT-1)) { old_address = u32_address; - u32_address = (u32_address + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); + u32_address = (u32_address + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); /* * adjust the length by whatever we aligned by -- cgit v1.2.3