diff --git a/src/sys/compile/Makefile b/src/sys/compile/Makefile index 18dee2c..74bd7d3 100644 --- a/src/sys/compile/Makefile +++ b/src/sys/compile/Makefile @@ -16,7 +16,7 @@ $(KERNEL) : $(OBJS) #$(LD) -nostdlib -nostdinc --warn-section-align -o $@ $(OBJS) $(KPARTS) -Ttext 0x30000 -Tdata 0x20000 $(LD) -T ./ldscript.i386 -o $@ $(OBJS) $(KPARTS) - /usr/bin/strip $@ + #/usr/bin/strip $@ # Compile the source files .cc.o: diff --git a/src/sys/lib/kmalloc.c b/src/sys/lib/kmalloc.c index 69fc327..f675039 100644 --- a/src/sys/lib/kmalloc.c +++ b/src/sys/lib/kmalloc.c @@ -71,6 +71,7 @@ ************************************************************************/ static void *getEmptyDesc() { + int i = 0x0; struct memDescriptor *tmpDesc = emptyKernDesc; assert(tmpDesc); @@ -84,8 +85,22 @@ spinUnlock(&emptyDescSpinLock); return(tmpDesc); } - kpanic("Error Finding Empty Descriptor!\n"); - return(0x0); + emptyKernDesc = (struct memDescriptor *)vmmGetFreeKernelPage(sysID,1); + memset(emptyKernDesc,0x0,0x4000); + + emptyKernDesc[0].next = &emptyKernDesc[1]; + + for (i = 0x1;i < ((0x1000/sizeof(struct memDescriptor))*4);i++) { + emptyKernDesc[i].next = &emptyKernDesc[i+1]; + emptyKernDesc[i].prev = &emptyKernDesc[i-1]; + } + + emptyKernDesc = tmpDesc->next; + emptyKernDesc->prev = 0x0; + tmpDesc->next = 0x0; + tmpDesc->prev = 0x0; + spinUnlock(&emptyDescSpinLock); + return(tmpDesc); } /************************************************************************ @@ -336,6 +351,9 @@ /*** $Log$ + Revision 1.13 2004/07/20 22:29:55 reddawg + assert: remade assert + Revision 1.12 2004/07/20 18:58:24 reddawg Few fixes