hostinfo.hh (5202:ff56fa8c2091) | hostinfo.hh (6214:1ec0ec8933ae) |
---|---|
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; --- 19 unchanged lines hidden (view full) --- 28 * Authors: Nathan Binkert 29 */ 30 31#ifndef __HOSTINFO_HH__ 32#define __HOSTINFO_HH__ 33 34#include <string> 35 | 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; --- 19 unchanged lines hidden (view full) --- 28 * Authors: Nathan Binkert 29 */ 30 31#ifndef __HOSTINFO_HH__ 32#define __HOSTINFO_HH__ 33 34#include <string> 35 |
36#include "sim/host.hh" | 36#include "base/types.hh" |
37 38std::string &hostname(); 39 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__ | 37 38std::string &hostname(); 39 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__ |