-Seg:0 Size:6918 Owner:0x80\r
-Seg:1b06 Size:256 Owner:0x64b0\r
-Seg:218d Size:33 Owner:0x80\r
-Seg:235f Size:44194 Owner:0x80\r
-Seg:d021 Size:4294967264 Owner:0x76ff\r
-Seg:d021 Size:4294967264 Owner:0x70bc\r
-Seg:d021 Size:4294967264 Owner:0x8b55\r
-Seg:d021 Size:4294967264 Owner:0xc483\r
-Seg:d021 Size:4294967264 Owner:0x4c4\r
-Seg:d021 Size:4294967264 Owner:0x90cb\r
-Seg:d021 Size:4294967264 Owner:0xfa7e\r
-Seg:d021 Size:4294967264 Owner:0x104\r
-Seg:d021 Size:4294967264 Owner:0xfa4e\r
-Seg:d021 Size:4294967264 Owner:0x215e\r
-Seg:d021 Size:525 Owner:0x0\r
-Seg:d22e Size:1959 Owner:0x920a\r
-Seg:e000 Size:4294909951 Owner:0x80\r
+Seg:0 Size:5202 Owner:0xfa\r
+Seg:1452 Size:256 Owner:0x64d2\r
+Seg:1552 Size:48 Owner:0x922a\r
+Seg:1af4 Size:18 Owner:0x2bfe\r
+Seg:1eea Size:49430 Owner:0xff01\r
+Seg:e000 Size:4294909951 Owner:0x64d2\r
printf("&bigbuffer= %Fp\n", &bigbuffer);
printf("bigbuffer= %04x\n", bigbuffer);
printf("&bigbuffer= %04x\n", &bigbuffer);
+ getch();
#ifdef FILERL
// bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD);
// printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
baka=0;
// close(bakapeehandle);
//hmm functions in cache system use the buffered stuff
-// printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));
+ printf("size of big buffer~=%u\n", _bmsize(sega, bigbuffer));
#endif
printf("dark purple = purgable\n");
printf("medium blue = non purgable\n");
printf("red = locked\n");
-// getch();
+ getch();
//++++modexEnter();
//++++modexShowPage(&screen);
MM_ShowMemory(/*&screen, */&mm);
if(baka) printf("\nyay!\n");
else printf("\npoo!\n");
#endif
- //printf("_bios_memsize=%u\n", _bios_memsize());
printf("bigbuffer= %Fp\n", bigbuffer);
printf("&bigbuffer= %Fp\n", &bigbuffer);
printf("bigbuffer= %04x\n", bigbuffer);
print_normal_entry(kittengets(2,1,"Near"), (dword)nh_total, (dword)nh_used, (dword)nh_free);
print_normal_entry(kittengets(2,1,"Far"), (dword)fh_total, (dword)fh_used, (dword)fh_free);
printf( "---------------- -------- -------- --------\n");
-//printf("memavl = %lu\n", (dword)_memavl());
+printf("coreleft = %lu\n", (dword)_coreleft());
+printf("farcoreleft = %lu\n", (dword)_farcoreleft());
+printf("memavl = %lu\n", (dword)_memavl());
printf("stackavail = %u\n", stackavail());
}
//
//---- length=coreleft();
printf(" nearheap making!\n");
- _heapgrow();
- length=_memmax();//(dword)GetFreeSize();
- start = (void huge *)(mm->nearheap = malloc(length));
+ _nheapgrow();
+ length=(dword)_coreleft();//(dword)_memmax();//(dword)GetFreeSize();
+ start = (void huge *)(mm->nearheap = _nmalloc(length));
length -= 16-(FP_OFF(start)&15);
length -= SAVENEARHEAP;
seglength = length / 16; // now in paragraphs
MML_UseSpace(segstart,seglength, mm);
mmi->nearheap = length;
printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length);
- printf(" near heap ok!\n");
+ //heapdump();
+ //getch();
//
// get all available far conventional memory segments
//---- length=farcoreleft();
printf(" farheap making!\n");
_fheapgrow();
- length=(dword)GetFarFreeSize();//0xffffUL*4UL;
+ length=(dword)_farcoreleft();//(dword)GetFarFreeSize();//0xffffUL*4UL;
//start = mm->farheap = halloc(length, 1);
start = mm->farheap = _fmalloc(length);
length -= 16-(FP_OFF(start)&15);
MML_UseSpace(segstart,seglength, mm);
mmi->farheap = length;
printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length);
- printf(" far heap ok!\n");
+ heapdump();
mmi->mainmem = mmi->nearheap + mmi->farheap;
{
printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug!
printf(" XMS!\n");
- MML_SetupXMS(mm, mmi); // allocate as many UMBs as possible
+ //MML_SetupXMS(mm, mmi); // allocate as many UMBs as possible
}
//
return;
_ffree(mm->farheap); printf(" far freed\n");
- free(mm->nearheap); printf(" near freed\n");
+ _nfree(mm->nearheap); printf(" near freed\n");
if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf(" EMS freed\n"); }
if(MML_CheckForXMS(mm)){ MML_ShutdownXMS(mm); printf(" XMS freed\n"); }
}
if (mm->bombonerror)
{
printf(OUT_OF_MEM_MSG,(size-mmi->nearheap));
- exit(-5);
+ exit(-1);
}
else
mm->mmerror = true;
#endif
-#define SAVENEARHEAP 0x200 // space to leave in data segment
-#define SAVEFARHEAP 0x400 // space to leave in far heap
+#define SAVENEARHEAP 0//x200 // space to leave in data segment
+#define SAVEFARHEAP 0//x400 // space to leave in far heap
#define BUFFERSIZE 0x1000 // miscelanious, allways available buffer
memptr bufferseg;
boolean mmstarted, bombonerror, mmerror;
void huge *farheap;
- void *nearheap;
+ void __near *nearheap;
//byte EMS_status;
unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
unsigned int EMSVer;