Tear out old heap code, replace with code that simply allocates memory

for use by malloc().

This breaks the image-loading code (which previously used the heap to
allocate the buffer for downloading the image), but that's not a major
concern since I'm going to tear out all the image formats within the next
couple of days anyway.  Byebye, NBI!  :)
This commit is contained in:
Michael Brown
2006-05-16 15:00:36 +00:00
parent 689218618f
commit 0afa9db2de
5 changed files with 37 additions and 304 deletions
-13
View File
@@ -30,7 +30,6 @@ Modifications: Ken Yap (for Etherboot/16)
*/
#include "io.h"
#include "heap.h"
#include "memsizes.h"
/* Linker symbols */
@@ -57,18 +56,6 @@ int prep_segment ( physaddr_t start, physaddr_t mid, physaddr_t end ) {
return 0;
}
/* Check for overlap with used portion of heap. Since the
* heap code just finds the biggest available memory area, we
* check only against the used heap area, rather than the
* whole heap area.
*/
if ( ( end > heap_ptr ) && ( start < heap_end ) ) {
DBG ( "OSLOADER got segment [%lX, %lX) "
"overlapping used heap [%lX, %lX)\n",
start, end, heap_ptr, heap_end );
return 0;
}
/* Check that block fits entirely inside a single memory region */
fit = 0;
for ( i = 0 ; i < meminfo.map_count ; i++ ) {