X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=t%2Fstest.c;h=b95968f14dd073a3f52b4f8a0f133a248ead130c;hb=1cf97788d4e533e4216160c2715f14596106e1e5;hp=efb256efa92d106fe1902de36a5bcdfcf4e1adf7;hpb=9077ee4ae85d3a4519f99372b884ec7d9fd3e781;p=fio.git diff --git a/t/stest.c b/t/stest.c index efb256ef..b95968f1 100644 --- a/t/stest.c +++ b/t/stest.c @@ -4,6 +4,7 @@ #include "../smalloc.h" #include "../flist.h" +#include "../arch/arch.h" #include "debug.h" #define MAGIC1 0xa9b1c8d2 @@ -17,7 +18,7 @@ struct elem { unsigned int magic2; }; -FLIST_HEAD(list); +static FLIST_HEAD(list); static int do_rand_allocs(void) { @@ -30,7 +31,7 @@ static int do_rand_allocs(void) srand(MAGIC1); #endif nr = total = 0; - while (total < 128*1024*1024UL) { + while (total < 120*1024*1024UL) { size = 8 * sizeof(struct elem) + (int) (999.0 * (rand() / (RAND_MAX + 1.0))); e = smalloc(size); if (!e) { @@ -58,25 +59,14 @@ static int do_rand_allocs(void) return 0; } -static int do_specific_alloc(unsigned long size) -{ - void *ptr; - - ptr = smalloc(size); - sfree(ptr); - return 0; -} - int main(int argc, char *argv[]) { + arch_init(argv); sinit(); debug_init(); do_rand_allocs(); - /* smalloc bug, commit 271067a6 */ - do_specific_alloc(671386584); - scleanup(); return 0; }