summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/heapwalk/heapwalk.scn
blob: e4a34860058f9bdbf2eaf17b2539beaaec0e1091 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
*** HEAP WALK TEST ***
start with a system state != SYSTEM_STATE_UP
testing the _Heap_Walk_check_control() function
        test what happens if page size = 0
        set page size to a not CPU-aligned value
        set minimal block size to a not page aligned value
        set allocation area of the first block to be non page-aligned
        clear the previous used flag of the first block
        mark last block as free
        set invalid next block for last block
testing the _Heap_Walk_check_free_list() function
        no free blocks
        create a loop in the free list
        put a block outside the heap to the free list
        put a block on the free list, which is not page-aligned
        put a used block on the free list
Walk freshly initialized heap
Test the main loop
        set the blocksize so, that the next block is outside the heap
        walk a heap with blocks with different states of the previous-used flag
        create a block with a not page aligned size
        create a block with a size smaller than the min_block_size
        make a block with a size, so that the block reaches into the next block
        create a block with invalid successor
        make a block with a size, so that it includes the next block
test the _Heap_Walk_check_free_block() function
        set a previous size for the next block which is not equal to the size of the actual block
        clear the previous_used flag of the first free block after an used block
        take a free block out of the free list
test the output-function for the _Heap_Walk()
therefore use the (already tested) case with a page size of 0
PASS[0]: page size 0, min block size 16
        area begin 0x0202D4BC, area end 0x0202E4BC
        first block 0x0202D4C0, last block 0x0202E4B0
        first free 0x0202D4C0, last free 0x0202D4C0
FAIL[0]: page size is zero
*** END OF HEAP WALK TEST ***