aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-22 10:39:00 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-22 10:39:00 +0000
commit7d197456418a1cfef07417a827489a4d45d27594 (patch)
tree952f118b00164e3f43d2e2c7e8010f1c0d4b2932
parentc09d291303a77df236bf5210365cee21ff2e59a7 (diff)
downloadChibiOS-7d197456418a1cfef07417a827489a4d45d27594.tar.gz
ChibiOS-7d197456418a1cfef07417a827489a4d45d27594.tar.bz2
ChibiOS-7d197456418a1cfef07417a827489a4d45d27594.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1659 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/SPC563/hal_lld.h2
-rw-r--r--test/testheap.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/os/hal/platforms/SPC563/hal_lld.h b/os/hal/platforms/SPC563/hal_lld.h
index 52cd722a5..49943a098 100644
--- a/os/hal/platforms/SPC563/hal_lld.h
+++ b/os/hal/platforms/SPC563/hal_lld.h
@@ -144,7 +144,7 @@
BIUCR_MASTER0_PREFETCH | \
BIUCR_DPFEN | \
BIUCR_IPFEN | \
- BIUCR_PFLIM_ON_HITMISS | \
+ BIUCR_PFLIM_ON_MISS | \
BIUCR_BFEN)
#endif
diff --git a/test/testheap.c b/test/testheap.c
index 7d5c25610..84936babc 100644
--- a/test/testheap.c
+++ b/test/testheap.c
@@ -114,7 +114,10 @@ static void heap1_execute(void) {
chHeapFree(p1);
test_assert(5, chHeapStatus(&test_heap, &n) == 2, "invalid state");
p1 = chHeapAlloc(&test_heap, SIZE);
- test_assert(6, chHeapStatus(&test_heap, &n) == 1, "heap fragmented");
+ /* Note, the first situation happens when the alignment size is smaller
+ than the header size, the second in the other cases.*/
+ test_assert(6, (chHeapStatus(&test_heap, &n) == 1) ||
+ (chHeapStatus(&test_heap, &n) == 2), "heap fragmented");
chHeapFree(p2);
chHeapFree(p1);
test_assert(7, chHeapStatus(&test_heap, &n) == 1, "heap fragmented");