Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: src/freertos/cmpctmalloc_test.cc

Issue 2082983002: Fix cmpctmalloc for large allocations (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: format Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/freertos/cmpctmalloc.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/freertos/cmpctmalloc.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698