resetting manifest requested domain to floor
[platform/upstream/ccache.git] / counters.h
1 /*
2  * Copyright (C) 2010 Joel Rosdahl
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 3 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 51
16  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18
19 #ifndef COUNTERS_H
20 #define COUNTERS_H
21
22 struct counters {
23         unsigned *data;   /* counter value */
24         size_t size;      /* logical array size */
25         size_t allocated; /* allocated size */
26 };
27
28 struct counters *counters_init(size_t initial_size);
29 void counters_resize(struct counters *c, size_t new_size);
30 void counters_free(struct counters *c);
31
32 #endif