OLD | NEW |
1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 #include <cinttypes> | 6 #include <cinttypes> |
7 | 7 |
8 #include "src/freertos/cmpctmalloc.h" | 8 #include "src/freertos/cmpctmalloc.h" |
9 #include "src/freertos/page_alloc.h" | 9 #include "src/freertos/page_alloc.h" |
10 #include "src/freertos/page_allocator.h" | 10 #include "src/freertos/page_allocator.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 size_t heap_size = 60 * PAGE_SIZE; // TODO(sgjesse): Test with few pages. | 38 size_t heap_size = 60 * PAGE_SIZE; // TODO(sgjesse): Test with few pages. |
39 heap_size = 0x800000; | 39 heap_size = 0x800000; |
40 void* heap_memory; | 40 void* heap_memory; |
41 int result = posix_memalign(&heap_memory, PAGE_SIZE, heap_size); | 41 int result = posix_memalign(&heap_memory, PAGE_SIZE, heap_size); |
42 EXPECT_EQ(0, result); | 42 EXPECT_EQ(0, result); |
43 int arena1_bitmap = page_allocator->AddArena( | 43 int arena1_bitmap = page_allocator->AddArena( |
44 "test", reinterpret_cast<uintptr_t>(heap_memory), heap_size); | 44 "test", reinterpret_cast<uintptr_t>(heap_memory), heap_size); |
45 EXPECT_EQ(1, arena1_bitmap); | 45 EXPECT_EQ(1, arena1_bitmap); |
46 | 46 |
47 cmpct_test_buckets(); | 47 cmpct_test_buckets(); |
48 // TODO(534): This test crashes. | 48 cmpct_test_get_back_newly_freed(); |
49 // cmpct_test_get_back_newly_freed(); | |
50 cmpct_test_return_to_os(); | 49 cmpct_test_return_to_os(); |
51 cmpct_test_trim(); | 50 cmpct_test_trim(); |
52 cmpct_dump(); | 51 cmpct_dump(); |
53 } | 52 } |
OLD | NEW |