hostinfo.hh (2665:a124942bacb8) | hostinfo.hh (5202:ff56fa8c2091) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32#define __HOSTINFO_HH__ 33 34#include <string> 35 36#include "sim/host.hh" 37 38std::string &hostname(); 39 | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 23 unchanged lines hidden (view full) --- 32#define __HOSTINFO_HH__ 33 34#include <string> 35 36#include "sim/host.hh" 37 38std::string &hostname(); 39 |
40uint64_t procInfo(char *filename, char *target); | 40uint64_t procInfo(const char *filename, const char *target); |
41 42inline uint64_t memUsage() 43{ return procInfo("/proc/self/status", "VmSize:"); } 44 45#endif // __HOSTINFO_HH__ | 41 42inline uint64_t memUsage() 43{ return procInfo("/proc/self/status", "VmSize:"); } 44 45#endif // __HOSTINFO_HH__ |