hostinfo.hh revision 9554:406fbcf60223
14604Sgblack@eecs.umich.edu/* 24604Sgblack@eecs.umich.edu * Copyright (c) 2003-2005 The Regents of The University of Michigan 34604Sgblack@eecs.umich.edu * All rights reserved. 44604Sgblack@eecs.umich.edu * 54604Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 64604Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 74604Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 84604Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 94604Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 104604Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 114604Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 124604Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 134604Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 144604Sgblack@eecs.umich.edu * this software without specific prior written permission. 154604Sgblack@eecs.umich.edu * 164604Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 174604Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 184604Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 194604Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 204604Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 214604Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 224604Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 234604Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 244604Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 254604Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 264604Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 274604Sgblack@eecs.umich.edu * 284604Sgblack@eecs.umich.edu * Authors: Nathan Binkert 294604Sgblack@eecs.umich.edu */ 304604Sgblack@eecs.umich.edu 314604Sgblack@eecs.umich.edu#ifndef __HOSTINFO_HH__ 324604Sgblack@eecs.umich.edu#define __HOSTINFO_HH__ 334604Sgblack@eecs.umich.edu 344604Sgblack@eecs.umich.edu#include <string> 354604Sgblack@eecs.umich.edu 364604Sgblack@eecs.umich.edu#include "base/types.hh" 374604Sgblack@eecs.umich.edu 384604Sgblack@eecs.umich.edustd::string __get_hostname(); 394604Sgblack@eecs.umich.edu 404604Sgblack@eecs.umich.edustd::string &hostname(); 414604Sgblack@eecs.umich.edu 424604Sgblack@eecs.umich.eduuint64_t procInfo(const char *filename, const char *target); 434604Sgblack@eecs.umich.edu 444604Sgblack@eecs.umich.edu/** 454604Sgblack@eecs.umich.edu * Determine the simulator process' total virtual memory usage. 464604Sgblack@eecs.umich.edu * 474604Sgblack@eecs.umich.edu * @return virtual memory usage in kilobytes 484604Sgblack@eecs.umich.edu */ 494604Sgblack@eecs.umich.eduuint64_t memUsage(); 504604Sgblack@eecs.umich.edu 514604Sgblack@eecs.umich.edu#endif // __HOSTINFO_HH__ 524604Sgblack@eecs.umich.edu