summaryrefslogtreecommitdiff
path: root/fw/fe310/phone/mem.c
blob: 90bc848e0fc05496f26e80be49d353cd132b7552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>

extern char metal_segment_itim_target_start;
extern char metal_segment_itim_target_end;

extern char metal_segment_data_target_start;
extern char metal_segment_data_target_end;

extern char metal_segment_bss_start;
extern char metal_segment_bss_end;

extern char metal_segment_heap_start;
extern char metal_segment_heap_end;

extern char metal_segment_stack_start;
extern char metal_segment_stack_end;

void mem_print(void) {
    printf("ITIM:  %p - %p\n", &metal_segment_itim_target_start, &metal_segment_itim_target_end);
    printf("DATA:  %p - %p\n", &metal_segment_data_target_start, &metal_segment_data_target_end);
    printf("BSS:   %p - %p\n", &metal_segment_bss_start, &metal_segment_bss_end);
    printf("STACK: %p - %p\n", &metal_segment_stack_start, &metal_segment_stack_end);
    printf("HEAP:  %p - %p\n", &metal_segment_heap_start, &metal_segment_heap_end);
}