"Fossies" - the Fresh Open Source Software Archive

Member "memtime-1.3/machdep.h" (21 Jan 2002, 1695 Bytes) of package /linux/misc/old/memtime-1.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "machdep.h" see the Fossies "Dox" file reference documentation.

    1 /* -*- mode: C; c-file-style: "k&r"; -*-
    2  *---------------------------------------------------------------------------*
    3  *
    4  * Copyright (c) 2000, Johan Bengtsson
    5  * 
    6  * Permission is hereby granted, free of charge, to any person obtaining a
    7  * copy of this software and associated documentation files (the "Software"),
    8  * to deal in the Software without restriction, including without limitation
    9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
   10  * and/or sell copies of the Software, and to permit persons to whom the
   11  * Software is furnished to do so, subject to the following conditions:
   12  * The above copyright notice and this permission notice shall be included in
   13  * all copies or substantial portions of the Software.
   14  *
   15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   21  * DEALINGS IN THE SOFTWARE.
   22  *
   23  *---------------------------------------------------------------------------*/
   24 
   25 #ifndef MACHDEP_H
   26 #define MACHDEP_H
   27  
   28 struct memtime_info {
   29      unsigned int utime_ms;
   30      unsigned int stime_ms;
   31      unsigned int rss_kb;
   32      unsigned int vsize_kb;
   33 };
   34 
   35 int init_machdep(pid_t process);
   36 int get_sample(struct memtime_info *info);
   37 unsigned int get_time();
   38 int set_mem_limit(long int maxbytes);
   39 int set_cpu_limit(long int maxseconds);
   40 #endif /* MACHDEP_H */