2b82db3f7bc474306af45616c424597a671fdd7c
[lugburz] / src / amiga / mem.c
1 #include <stdio.h>
2 #include "serial.h"
3 #include "mem.h"
4 #include "amigalib.h"
5
6 int init_mem(void)
7 {
8         struct alib_memnode *mem;
9
10         printf("Memory ranges:\n");
11         mem = execbase->memlist.head;
12         while(mem->n_next) {
13                 char *stype;
14                 if(mem->attrib & ALIB_MEMF_CHIP) {
15                         stype = "chip";
16                 } else if(mem->attrib & ALIB_MEMF_FAST) {
17                         stype = "fast";
18                 } else {
19                         stype = "unknown";
20                 }
21                 printf(" %06lx - %06lx: %s\n", (unsigned long)mem->start,
22                                 (unsigned long)mem->end, stype);
23                 mem = mem->n_next;
24         }
25
26         return 0;
27 }