LCOV - code coverage report
Current view: top level - gcc - ggc-none.c (source / functions) Hit Total Coverage
Test: gcc.info Lines: 0 17 0.0 %
Date: 2020-04-04 11:58:09 Functions: 0 7 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* Null garbage collection for the GNU compiler.
       2                 :            :    Copyright (C) 1998-2020 Free Software Foundation, Inc.
       3                 :            : 
       4                 :            :    This file is part of GCC.
       5                 :            : 
       6                 :            :    GCC is free software; you can redistribute it and/or modify it
       7                 :            :    under the terms of the GNU General Public License as published by
       8                 :            :    the Free Software Foundation; either version 3, or (at your option)
       9                 :            :    any later version.
      10                 :            : 
      11                 :            :    GCC is distributed in the hope that it will be useful, but WITHOUT
      12                 :            :    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
      13                 :            :    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      14                 :            :    License for more details.
      15                 :            : 
      16                 :            :    You should have received a copy of the GNU General Public License
      17                 :            :    along with GCC; see the file COPYING3.  If not see
      18                 :            :    <http://www.gnu.org/licenses/>.  */
      19                 :            : 
      20                 :            : /* This version is used by the gen* programs and certain language-specific
      21                 :            :    targets (such as java), where we don't really need GC at all.
      22                 :            :    This prevents problems with pulling in all the tree stuff.  */
      23                 :            : 
      24                 :            : #ifdef GENERATOR_FILE
      25                 :            : #include "bconfig.h"
      26                 :            : #else
      27                 :            : #include "config.h"
      28                 :            : #endif
      29                 :            : 
      30                 :            : #include "system.h"
      31                 :            : #include "coretypes.h"
      32                 :            : #include "hash-table.h"
      33                 :            : 
      34                 :            : /* For a given size of memory requested for allocation, return the
      35                 :            :    actual size that is going to be allocated.  */
      36                 :            : 
      37                 :            : size_t
      38                 :          0 : ggc_round_alloc_size (size_t requested_size)
      39                 :            : {
      40                 :          0 :   return requested_size;
      41                 :            : }
      42                 :            : 
      43                 :            : void *
      44                 :          0 : ggc_internal_alloc (size_t size, void (*f)(void *), size_t, size_t
      45                 :            :                     MEM_STAT_DECL)
      46                 :            : {
      47                 :          0 :   gcc_assert (!f); // ggc-none doesn't support finalizers
      48                 :          0 :   return xmalloc (size);
      49                 :            : }
      50                 :            : 
      51                 :            : void *
      52                 :          0 : ggc_internal_cleared_alloc (size_t size, void (*f)(void *), size_t, size_t
      53                 :            :                             MEM_STAT_DECL)
      54                 :            : {
      55                 :          0 :   gcc_assert (!f); // ggc-none doesn't support finalizers
      56                 :          0 :   return xcalloc (size, 1);
      57                 :            : }
      58                 :            : 
      59                 :            : void *
      60                 :          0 : ggc_realloc_stat (void *x, size_t size MEM_STAT_DECL)
      61                 :            : {
      62                 :          0 :   return xrealloc (x, size);
      63                 :            : }
      64                 :            : 
      65                 :            : void
      66                 :          0 : ggc_free (void *p)
      67                 :            : {
      68                 :          0 :   free (p);
      69                 :          0 : }
      70                 :            : 
      71                 :            : void
      72                 :          0 : ggc_grow (void)
      73                 :            : {
      74                 :          0 : }
      75                 :            : 
      76                 :            : void
      77                 :          0 : ggc_trim (void)
      78                 :            : {
      79                 :          0 : }

Generated by: LCOV version 1.0

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto --enable-host-shared. GCC test suite is run with the built compiler.