]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.c
OK i think the borland C version and watcom version behave the same way! ^^
[16.git] / src / lib / 16_mm.c
index 9b4c475a3d3d6a2c8b04f6ab6ada9f861149b443..3312167239fd0e70b6c7c72a7430596e43a1e5e8 100644 (file)
@@ -744,12 +744,12 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //     printf("                nearheap making!\n");
 #ifdef __WATCOMC__
        _nheapgrow();
-       length=(dword)_memmax();//(dword)GetFreeSize();
-       start = (mm->nearheap = (void huge *)_nmalloc(length));
+       length=(dword)_memavl();//(dword)GetFreeSize();
+       start = (void huge *)(mm->nearheap = _nmalloc(length));
 #endif
 #ifdef __BORLANDC__
        length=coreleft();
-       start = (mm->nearheap = malloc(length));
+       start = (void huge *)(mm->nearheap = malloc(length));
 #endif
        length -= 16-(FP_OFF(start)&15);
        length -= SAVENEARHEAP;