Retro68/gcc/gcc/alloc-pool.cc

39 lines
1.2 KiB
C++
Raw Permalink Normal View History

2012-03-27 23:13:14 +00:00
/* Functions to support a pool of allocatable objects.
Copyright (C) 1987-2022 Free Software Foundation, Inc.
2012-03-27 23:13:14 +00:00
Contributed by Daniel Berlin <dan@cgsoftware.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
2015-08-28 15:33:40 +00:00
#include "coretypes.h"
2012-03-27 23:13:14 +00:00
#include "alloc-pool.h"
2017-04-10 11:32:00 +00:00
ALLOC_POOL_ID_TYPE last_id;
mem_alloc_description<pool_usage> pool_allocator_usage;
bool after_memory_report = false;
2012-03-27 23:13:14 +00:00
/* Output per-alloc_pool memory usage statistics. */
void
dump_alloc_pool_statistics (void)
{
2014-09-21 17:33:12 +00:00
if (! GATHER_STATISTICS)
return;
2017-04-10 11:32:00 +00:00
pool_allocator_usage.dump (ALLOC_POOL_ORIGIN);
2012-03-27 23:13:14 +00:00
}