mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-22 10:10:45 +00:00
Fixed bug in heap manager - forgot to initialise freeptr
This commit is contained in:
parent
a5fdf22a1d
commit
0c55d05177
2 changed files with 35 additions and 31 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include "wgt.h"
|
#include "wgt.h"
|
||||||
|
#include "include/mem.h"
|
||||||
|
|
||||||
// ######## REQUIRED FUNCTIONS ########
|
// ######## REQUIRED FUNCTIONS ########
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ void wgt08()
|
||||||
{
|
{
|
||||||
short x;
|
short x;
|
||||||
|
|
||||||
|
mem_init();
|
||||||
vga256 ();
|
vga256 ();
|
||||||
wcls (vgapal[0]);
|
wcls (vgapal[0]);
|
||||||
|
|
|
@ -19,6 +19,8 @@ void mem_init()
|
||||||
HEAP_START += 8 - ((long)&HEAP_START % 8);
|
HEAP_START += 8 - ((long)&HEAP_START % 8);
|
||||||
}
|
}
|
||||||
HEAP_END = (unsigned char *)(HEAP_START + HEAP_SIZE);
|
HEAP_END = (unsigned char *)(HEAP_START + HEAP_SIZE);
|
||||||
|
|
||||||
|
freeptr = HEAP_START;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *malloc(unsigned int size)
|
void *malloc(unsigned int size)
|
||||||
|
|
Loading…
Reference in a new issue