From: sparky4 Date: Thu, 2 Jul 2015 18:21:21 +0000 (-0500) Subject: made exmmtest.c flexible X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=4a3d30521e890c1777d254f2bcceacefc53c5454;p=16.git made exmmtest.c flexible Signed-off-by: sparky4 --- diff --git a/exmmtest.exe b/exmmtest.exe index 0668e4a2..7f37c5ae 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index ba07d3bb..532b43c9 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -31,12 +31,20 @@ main(int argc, char *argv[]) mminfo_t mm; mminfotype mmi; memptr bigbuffer; __segment segu; + char *bakapee; + + bakapee = malloc(64); +// memset(bakapee, 0, 64); mm.mmstarted=0; + + if(argv[1]) bakapee = strdup(argv[1]); + else bakapee = "data/koishi~~.pcx"; + printf("start!\n"); MM_Startup(&mm, &mmi); printf("done!\n"); printf("&main()=%Fp\n", *argv[0]); - if(CA_LoadFile("data/koishi~~.pcx", &bigbuffer, &mm, &mmi)) printf("\nyay!\n"); + if(CA_LoadFile(bakapee, &bigbuffer, &mm, &mmi)) printf("\nyay!\n"); //MM_GetPtr(&bigbuffer, mmi.nearheap, &mm, &mmi); //hmm functions in cache system use the buffered stuff printf("size of big buffer~=%ul\n", _bmsize(segu, bigbuffer)); @@ -46,4 +54,5 @@ main(int argc, char *argv[]) MM_FreePtr(&bigbuffer, &mm); MM_Shutdown(&mm); printf("done!\n"); + free(bakapee); }