From 7d197456418a1cfef07417a827489a4d45d27594 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 22 Feb 2010 10:39:00 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1659 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/SPC563/hal_lld.h | 2 +- test/testheap.c | 5 ++++- 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"); -- cgit v1.2.3