1
/* Structure counters and functions for getting at them.
2
* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
4
* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
5
* Created: Sun Dec 3 00:23:13 EST 1995
6
* Updated: Mon Mar 11 02:40:00 EST 1996
9
* This file is part of the GNUstep Base Library.
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Library General Public
13
* License as published by the Free Software Foundation; either
14
* version 2 of the License, or (at your option) any later version.
16
* This library is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* Library General Public License for more details.
21
* You should have received a copy of the GNU Library General Public
22
* License along with this library; if not, write to the Free
23
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
25
/**** Included Headers *******************************************************/
27
#include <base/numbers.h>
29
/**** Type, Constant, and Macro Definitions **********************************/
31
size_t ___o_number_allocated = 0;
32
size_t ___o_number_deallocated = 0;
33
size_t ___o_number_serialized = 0;
35
/**** Function Implementations ***********************************************/
37
/* Returns the number of Libobjects structures allocated. */
39
_o_number_allocated(void)
41
return ___o_number_allocated;
44
/* Returns the number of Libobjects structures deallocated. */
46
_o_number_deallocated(void)
48
return ___o_number_deallocated;
51
/* Returns the next serial number to be handed out. */
53
_o_number_serialized(void)
55
return ___o_number_serialized;
59
_o_next_power_of_two(size_t bound)
62
while ((start <= bound) && (start <<= 1));