[Assorted-commits] SF.net SVN: assorted: [512] numa-bench/trunk/src/malloc.cc
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-26 19:41:20
|
Revision: 512 http://assorted.svn.sourceforge.net/assorted/?rev=512&view=rev Author: yangzhang Date: 2008-02-26 11:41:17 -0800 (Tue, 26 Feb 2008) Log Message: ----------- added custom rng Modified Paths: -------------- numa-bench/trunk/src/malloc.cc Modified: numa-bench/trunk/src/malloc.cc =================================================================== --- numa-bench/trunk/src/malloc.cc 2008-02-26 19:41:06 UTC (rev 511) +++ numa-bench/trunk/src/malloc.cc 2008-02-26 19:41:17 UTC (rev 512) @@ -1,4 +1,3 @@ -#include <cstdlib> #include <fstream> #include <iostream> @@ -7,6 +6,7 @@ #include <boost/bind.hpp> #include <commons/check.h> +#include <commons/rand.h> #include <commons/threads.h> #include <commons/time.h> #include <commons/boost/threads.h> @@ -83,6 +83,7 @@ int* p = (int*) pp; const size_t count = len / sizeof(int); int sum = 0; + posix_rand rand(current_time_millis() ^ gettid()); if (config.write) { // Write to the region. if (config.shuffle) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |