diff --git a/c/iobench.c b/c/iobench.c index 39d16a0..d2b2374 100644 --- a/c/iobench.c +++ b/c/iobench.c @@ -38,10 +38,12 @@ int main(int argc,char**argv){ if(fd<0){perror("open");return 1;} off_t sz=lseek(fd,0,SEEK_END); if(sz2GB andava in overflow */ #pragma omp parallel num_threads(nth) reduction(+:tot) { void *buf; if(posix_memalign(&buf,4096,blk)){perror("memalign");exit(1);} @@ -50,7 +52,7 @@ int main(int argc,char**argv){ ssize_t r=pread(fd,buf,blk,offs[i]); if(r<0) perror("pread"); else tot+=r; } - free(buf); + compat_aligned_free(buf); /* su Windows posix_memalign=_aligned_malloc: free() corrompe l'heap */ } double dt=now()-t0; printf("%s x%d thread: %d letture x %ldMB = %.1f GB in %.2fs -> %.2f GB/s (%.1f ms/blocco effettivi)\n",