X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fexmmtest.c;h=00d01bf119415c556c5922d06f89fb92c85ab4d5;hb=403a2afcb791925d56ed1d3cab8e02287e22464a;hp=51c20afc78e0bcc5487b35e851d7fad890ddbf53;hpb=143ae2a4d3eccb53cb3c169590de7a2acb03354f;p=16.git diff --git a/src/exmmtest.c b/src/exmmtest.c index 51c20afc..00d01bf1 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -22,6 +22,7 @@ /* input test */ +#include "src/lib/16_ca.h" #include "src/lib/16_mm.h" void @@ -29,17 +30,35 @@ main(int argc, char *argv[]) { mminfo_t mm; mminfotype mmi; memptr bigbuffer; + __segment segu; + char *bakapee; + word baka; + + bakapee = malloc(64); +// memset(bakapee, 0, 64); mm.mmstarted=0; + + if(argv[1]) bakapee = argv[1]; + else bakapee = "data/koishi~~.pcx"; + printf("start!\n"); MM_Startup(&mm, &mmi); printf("done!\n"); printf("&main()=%Fp\n", *argv[0]); - MM_GetPtr(&bigbuffer, 65535UL, &mm, &mmi); - printf("size of big buffer~=%ul\n", _msize(bigbuffer)); + if(CA_LoadFile(bakapee, &bigbuffer, &mm, &mmi)) baka=1; + else + baka=0; + //MM_GetPtr(&bigbuffer, mmi.nearheap, &mm, &mmi); + //hmm functions in cache system use the buffered stuff + printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer)); MM_ShowMemory(&mm); MM_Report(&mm, &mmi); printf("stop!\n"); MM_FreePtr(&bigbuffer, &mm); MM_Shutdown(&mm); printf("done!\n"); + free(bakapee); + //printf("_bios_memsize=%u\n", _bios_memsize()); + if(baka) printf("\nyay!\n"); + else printf("\npoo!\n"); }