diff options
author | raas <andras.horvath@gmail.com> | 2022-04-26 13:26:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 13:26:25 +0200 |
commit | 482b2f57ad6f0a6176c10d41623b4dbe27a29138 (patch) | |
tree | 47efcecc060324877a7f2f73e589d8af8a40fa33 | |
parent | 2a15026ff65160127204881263464b1740a57198 (diff) | |
parent | bf1dabe29f0a2de8d613b94bde87ed624ce03865 (diff) |
Merge pull request #12 from Willian-Zhang/master
prepare for homebrew release
-rw-r--r-- | .gitignore | 34 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | mbw.c | 4 |
4 files changed, 45 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d924fe3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +build/ + +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app
\ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f739d7d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.10) + +project(mbw VERSION 1.4.1) + +add_executable(mbw mbw.c) +install(TARGETS mbw DESTINATION bin) @@ -2,10 +2,12 @@ MBW determines the "copy" memory bandwidth available to userspace programs. Its 2006, 2012 Andras.Horvath atnospam gmail.com 2013 j.m.slocum atnospam gmail.com +2022 Willian.Zhang http://github.com/raas/mbw +https://github.com/Willian-Zhang/mbw +'mbw 1000' to run copy memory test on all methods with 1 GiB memory. 'mbw -h' for help watch out for swap usage (or turn off swap) - @@ -120,10 +120,10 @@ double worker(unsigned long long asize, long *a, long *b, int type, unsigned lon char* bb = (char*)b; gettimeofday(&starttime, NULL); for (t=array_bytes; t >= block_size; t-=block_size, aa+=block_size){ - bb=mempcpy(bb, aa, block_size); + bb=(char *) memcpy(bb, aa, block_size) + block_size; } if(t) { - bb=mempcpy(bb, aa, t); + bb=(char *) memcpy(bb, aa, t) + t; } gettimeofday(&endtime, NULL); } else if(type==TEST_DUMB) { /* dumb test */ |