mirror of
https://github.com/cc65/cc65.git
synced 2025-02-24 09:29:07 +00:00
Internal identifier names have changed, _heap.h is available
git-svn-id: svn://svn.cc65.org/cc65/trunk@3196 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
beb8b1b5cb
commit
11e4382b8d
@ -2,15 +2,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <_heap.h>
|
||||||
|
|
||||||
|
|
||||||
/* From _heap.h */
|
|
||||||
extern unsigned _horg; /* Bottom of heap */
|
|
||||||
extern unsigned _hptr; /* Current top */
|
|
||||||
extern unsigned _hend; /* Upper limit */
|
|
||||||
extern unsigned _hfirst; /* First free block in list */
|
|
||||||
extern unsigned _hlast; /* Last free block in list */
|
|
||||||
|
|
||||||
|
|
||||||
static unsigned char* V[256];
|
static unsigned char* V[256];
|
||||||
|
|
||||||
@ -79,20 +73,20 @@ static void ShowInfo (void)
|
|||||||
{
|
{
|
||||||
/* Count free blocks */
|
/* Count free blocks */
|
||||||
unsigned Count = 0;
|
unsigned Count = 0;
|
||||||
unsigned** P = (unsigned**) _hfirst;
|
register struct freeblock* P = _heapfirst;
|
||||||
while (P) {
|
while (P) {
|
||||||
++Count;
|
++Count;
|
||||||
P = P[1];
|
P = P->next;
|
||||||
}
|
}
|
||||||
printf ("%04X %04X %04X %04X %04X %u\n",
|
printf ("%04X %04X %04X %04X %04X %u\n",
|
||||||
_horg, _hptr, _hend, _hfirst, _hlast, Count);
|
_heaporg, _heapptr, _heapend, _heapfirst, _heaplast, Count);
|
||||||
|
|
||||||
if (Count) {
|
if (Count) {
|
||||||
P = (unsigned**) _hfirst;
|
P = _heapfirst;
|
||||||
while (P) {
|
while (P) {
|
||||||
printf ("%04X %04X %04X %04X(%u)\n",
|
printf ("%04X %04X %04X %04X(%u)\n",
|
||||||
(unsigned) P, P[2], P[1], P[0], P[0]);
|
(unsigned) P, P[2], P[1], P[0], P[0]);
|
||||||
P = P[1];
|
P = P->next;
|
||||||
}
|
}
|
||||||
getchar ();
|
getchar ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user