[llvm-commits] [llvm] r146864 - /llvm/trunk/utils/json-bench/JSONBench.cpp
Manuel Klimek
klimek at google.com
Mon Dec 19 01:56:35 PST 2011
Author: klimek
Date: Mon Dec 19 03:56:35 2011
New Revision: 146864
URL: http://llvm.org/viewvc/llvm-project?rev=146864&view=rev
Log:
Allow for benchmarking more than 4GB of memory
Modified:
llvm/trunk/utils/json-bench/JSONBench.cpp
Modified: llvm/trunk/utils/json-bench/JSONBench.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/json-bench/JSONBench.cpp?rev=146864&r1=146863&r2=146864&view=diff
==============================================================================
--- llvm/trunk/utils/json-bench/JSONBench.cpp (original)
+++ llvm/trunk/utils/json-bench/JSONBench.cpp Mon Dec 19 03:56:35 2011
@@ -23,7 +23,7 @@
"Run a quick verification useful for regression testing"),
llvm::cl::init(false));
-static llvm::cl::opt<unsigned>
+static llvm::cl::opt<size_t>
MemoryLimitMB("memory-limit", llvm::cl::desc(
"Do not use more megabytes of memory"),
llvm::cl::init(1000));
@@ -49,11 +49,11 @@
Parsing.stopTimer();
}
-std::string createJSONText(unsigned MemoryMB, unsigned ValueSize) {
+std::string createJSONText(size_t MemoryMB, unsigned ValueSize) {
std::string JSONText;
llvm::raw_string_ostream Stream(JSONText);
Stream << "[\n";
- unsigned MemoryBytes = MemoryMB * 1024 * 1024;
+ size_t MemoryBytes = MemoryMB * 1024 * 1024;
while (JSONText.size() < MemoryBytes) {
Stream << " {\n"
<< " \"key1\": \"" << std::string(ValueSize, '*') << "\",\n"
More information about the llvm-commits
mailing list