src/hotspot/share/gc/epsilon/epsilonMemoryPool.hpp
author coleenp
Thu, 10 Jan 2019 15:13:51 -0500
changeset 53244 9807daeb47c4
parent 50523 7b7c75d87f9b
permissions -rw-r--r--
8216167: Update include guards to reflect correct directories Summary: Use script and some manual fixup to fix directores names in include guards. Reviewed-by: lfoltan, eosterlund, kbarrett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50523
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     1
/*
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     2
 * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     3
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     6
 * published by the Free Software Foundation.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     7
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    12
 * accompanied this code).
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    13
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    17
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    20
 * questions.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    21
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    22
 */
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    23
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50523
diff changeset
    24
#ifndef SHARE_GC_EPSILON_EPSILONMEMORYPOOL_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50523
diff changeset
    25
#define SHARE_GC_EPSILON_EPSILONMEMORYPOOL_HPP
50523
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    26
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    27
#include "gc/epsilon/epsilonHeap.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    28
#include "services/memoryPool.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    29
#include "services/memoryUsage.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    30
#include "utilities/macros.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    31
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    32
class EpsilonMemoryPool : public CollectedMemoryPool {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    33
private:
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    34
  EpsilonHeap* _heap;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    35
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    36
public:
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    37
  EpsilonMemoryPool(EpsilonHeap* heap);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    38
  size_t committed_in_bytes() { return _heap->capacity();     }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    39
  size_t used_in_bytes()      { return _heap->used();         }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    40
  size_t max_size()     const { return _heap->max_capacity(); }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    41
  MemoryUsage get_memory_usage();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    42
};
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    43
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 50523
diff changeset
    44
#endif // SHARE_GC_EPSILON_EPSILONMEMORYPOOL_HPP