projects
/
lugburz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
malloc/calloc/free and minimal allocator testing
[lugburz]
/
src
/
amiga
/
mem.c
diff --git
a/src/amiga/mem.c
b/src/amiga/mem.c
index
6b43a9e
..
b5556df
100644
(file)
--- a/
src/amiga/mem.c
+++ b/
src/amiga/mem.c
@@
-217,7
+217,7
@@
static void add_range(int pidx, struct memrange *mr)
struct memrange *prev, *next, dummy;
printf("DBG adding free range: %06lx - %06lx to pool %d\n", (unsigned long)mr,
struct memrange *prev, *next, dummy;
printf("DBG adding free range: %06lx - %06lx to pool %d\n", (unsigned long)mr,
- (unsigned long)(mr->start + mr->size - (unsigned char*)mr), pidx);
+ (unsigned long)(mr->start + mr->size), pidx);
dummy.next = pool[pidx];
prev = &dummy;
dummy.next = pool[pidx];
prev = &dummy;
@@
-245,3
+245,15
@@
static void add_range(int pidx, struct memrange *mr)
pool[pidx] = dummy.next;
}
pool[pidx] = dummy.next;
}
+
+void dbg_memprint(void)
+{
+ struct memrange *mr = pool[POOL_SLOW];
+
+ printf("MEM");
+ while(mr) {
+ printf(" [%lx - %lx]", (unsigned long)mr, (unsigned long)(mr->start + mr->size));
+ mr = mr->next;
+ }
+ putchar('\n');
+}