File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -23,21 +23,28 @@ uint32_t memory_used = 0;
23
23
24
24
void mm_init (uint32_t kernel_end )
25
25
{
26
+ info ("Initializing heap." , __FILE__ );
26
27
last_alloc = kernel_end + 0x1000 ;
27
28
heap_begin = last_alloc ;
28
29
pheap_end = 0x400000 ;
29
30
pheap_begin = pheap_end - (MAX_PAGE_ALIGNED_ALLOCS * 4096 );
30
31
heap_end = pheap_begin ;
31
32
heap_begin = heap_end - heap_begin ;
32
33
pheap_desc = (uint8_t * )malloc (MAX_PAGE_ALIGNED_ALLOCS );
34
+ done ("Heap initialized." , __FILE__ );
33
35
}
34
36
35
37
void mm_extend (uint32_t additional_size )
36
38
{
37
- if (additional_size <= 0 ) return ;
39
+ if (additional_size <= 0 ){
40
+ warn ("mm_extend: Invalid size." , __FILE__ );
41
+ return ;
42
+ }
38
43
44
+ info ("Extending heap." , __FILE__ );
39
45
heap_end += additional_size ;
40
46
printf ("Heap extended by %d bytes. New heap end: 0x%x" , additional_size , heap_end );
47
+ done ("Heap extended." , __FILE__ );
41
48
}
42
49
43
50
void mm_print_out ()
You can’t perform that action at this time.
0 commit comments