OLD | NEW |
1 // Copyright (c) 2016, the Fletch 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 // This code is ported from the LK repository. To keep the code in | 5 // This code is ported from the LK repository. To keep the code in |
6 // sync the define FLETCH_TARGET_OS_LK provides the code from the LK | 6 // sync the define FLETCH_TARGET_OS_LK provides the code from the LK |
7 // repository. Without the define FLETCH_TARGET_OS_LK this code will | 7 // repository. Without the define FLETCH_TARGET_OS_LK this code will |
8 // build and link for the disco_fletch project. | 8 // build and link for the disco_fletch project. |
9 #ifdef FLETCH_TARGET_OS_LK | 9 #ifdef FLETCH_TARGET_OS_LK |
10 | 10 |
11 #include <debug.h> | 11 #include <debug.h> |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 for (int i = 0; i < BUCKET_WORDS; i++) { | 893 for (int i = 0; i < BUCKET_WORDS; i++) { |
894 theheap.free_list_bits[i] = 0; | 894 theheap.free_list_bits[i] = 0; |
895 } | 895 } |
896 | 896 |
897 size_t initial_alloc = HEAP_GROW_SIZE - 2 * sizeof(header_t); | 897 size_t initial_alloc = HEAP_GROW_SIZE - 2 * sizeof(header_t); |
898 | 898 |
899 theheap.remaining = 0; | 899 theheap.remaining = 0; |
900 | 900 |
901 heap_grow(initial_alloc, NULL); | 901 heap_grow(initial_alloc, NULL); |
902 } | 902 } |
OLD | NEW |