su 1.12.11devel
Loading...
Searching...
No Matches
su_alloc_stat.h
Go to the documentation of this file.
1/*
2 * This file is part of the Sofia-SIP package
3 *
4 * Copyright (C) 2005 Nokia Corporation.
5 *
6 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef SU_ALLOC_STAT_H
27#define SU_ALLOC_STAT_H
28
38#ifndef SU_ALLOC_H
39#include <sofia-sip/su_alloc.h>
40#endif
41
42#ifndef SU_TYPES_H
43#include <sofia-sip/su_types.h>
44#endif
45
46SOFIA_BEGIN_DECLS
47
48typedef struct su_home_stat_t su_home_stat_t;
49
50SU_DLL void su_home_init_stats(su_home_t *h);
51SU_DLL void su_home_get_stats(su_home_t *, int include_clones,
52 su_home_stat_t *stats, isize_t statssize);
53
54SU_DLL void su_home_stat_add(su_home_stat_t *total,
55 su_home_stat_t const *hs);
56
57struct su_home_stat_t
58{
59 int hs_size;
60 usize_t hs_clones;
61 usize_t hs_rehash;
62 usize_t hs_blocksize;
64 struct {
65 unsigned hsp_size;
66 unsigned hsp_used;
67 } hs_preload;
68
69 struct {
70 uint64_t hsa_number;
71 uint64_t hsa_bytes;
72 uint64_t hsa_rbytes;
73 uint64_t hsa_maxrbytes;
74 uint64_t hsa_preload;
75 } hs_allocs;
76
77 struct {
78 uint64_t hsf_number;
79 uint64_t hsf_bytes;
80 uint64_t hsf_rbytes;
81 uint64_t hsf_preload;
82 } hs_frees;
83
84 struct {
85 uint64_t hsb_number;
86 uint64_t hsb_bytes;
87 uint64_t hsb_rbytes;
88 } hs_blocks;
89};
90
91SOFIA_END_DECLS
92
93#endif /* ! defined(SU_ALLOC_H) */
Home-based memory management interface.
SU_HOME_T su_home_t
Memory home type.
Definition su_alloc.h:50
void su_home_init_stats(su_home_t *h)
Initialize statistics structure.
Definition su_alloc.c:1662
void su_home_get_stats(su_home_t *, int include_clones, su_home_stat_t *stats, isize_t statssize)
Retrieve statistics from memory home.
Definition su_alloc.c:1693
Basic integer types for su library.
SU_U64_T uint64_t
64-bit unsigned integer
Definition su_types.h:83

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