sofia-sip/su_alloc_stat.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of the Sofia-SIP package
00003  *
00004  * Copyright (C) 2005 Nokia Corporation.
00005  *
00006  * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00021  * 02110-1301 USA
00022  *
00023  */
00024 
00025 #ifndef SU_ALLOC_STAT_H
00026 
00027 #define SU_ALLOC_STAT_H 
00028 
00038 #ifndef SU_ALLOC_H
00039 #include <sofia-sip/su_alloc.h>
00040 #endif
00041 
00042 #ifndef SU_TYPES_H
00043 #include <sofia-sip/su_types.h>
00044 #endif
00045 
00046 SOFIA_BEGIN_DECLS
00047 
00048 typedef struct su_home_stat_t su_home_stat_t;
00049 
00050 SU_DLL void su_home_init_stats(su_home_t *h);
00051 SU_DLL void su_home_get_stats(su_home_t *, int include_clones, 
00052                               su_home_stat_t *stats, isize_t statssize);
00053 
00054 SU_DLL void su_home_stat_add(su_home_stat_t *total, 
00055                              su_home_stat_t const *hs);
00056 
00057 struct su_home_stat_t
00058 {
00059   int      hs_size;
00060   usize_t hs_clones;            
00061   usize_t hs_rehash;            
00062   usize_t hs_blocksize;         
00064   struct {
00065     unsigned hsp_size;          
00066     unsigned hsp_used;          
00067   } hs_preload;
00068 
00069   struct {
00070     uint64_t hsa_number;
00071     uint64_t hsa_bytes;
00072     uint64_t hsa_rbytes;
00073     uint64_t hsa_maxrbytes;
00074     uint64_t hsa_preload;       
00075   } hs_allocs;
00076 
00077   struct {
00078     uint64_t hsf_number;
00079     uint64_t hsf_bytes;
00080     uint64_t hsf_rbytes;
00081     uint64_t hsf_preload;       
00082   } hs_frees;
00083 
00084   struct {
00085     uint64_t hsb_number;
00086     uint64_t hsb_bytes;
00087     uint64_t hsb_rbytes;
00088   } hs_blocks;
00089 };
00090 
00091 SOFIA_END_DECLS
00092 
00093 #endif /* ! defined(SU_ALLOC_H) */

Sofia-SIP 1.12.6work - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.