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