summaryrefslogtreecommitdiff
path: root/klm/util/usage.hh
blob: e19eda7bfea2ff2db6006b56772b3c50a2a1c7cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef UTIL_USAGE__
#define UTIL_USAGE__
#include <cstddef>
#include <iosfwd>
#include <string>

#include <stdint.h>

namespace util {
void PrintUsage(std::ostream &to);

// Determine how much physical memory there is.  Return 0 on failure.
uint64_t GuessPhysicalMemory();

// Parse a size like unix sort.  Sadly, this means the default multiplier is K.
uint64_t ParseSize(const std::string &arg);
} // namespace util
#endif // UTIL_USAGE__