Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/numberSeq.hpp @ 5938:2c0751569716
7152954: G1: Native memory leak during full GCs
Summary: Add destructor to TruncatedSeq and call delete when necessary
Reviewed-by: johnc, tonyp
author | brutisso |
---|---|
date | Tue, 13 Mar 2012 21:12:53 +0100 |
parents | f95d63e2154a |
children | bbc900c2482a |
comparison
equal
deleted
inserted
replaced
5937:cf956638b844 | 5938:2c0751569716 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
116 | 116 |
117 public: | 117 public: |
118 // accepts a value for L | 118 // accepts a value for L |
119 TruncatedSeq(int length = DefaultSeqLength, | 119 TruncatedSeq(int length = DefaultSeqLength, |
120 double alpha = DEFAULT_ALPHA_VALUE); | 120 double alpha = DEFAULT_ALPHA_VALUE); |
121 ~TruncatedSeq(); | |
121 virtual void add(double val); | 122 virtual void add(double val); |
122 virtual double maximum() const; | 123 virtual double maximum() const; |
123 virtual double last() const; // the last value added to the sequence | 124 virtual double last() const; // the last value added to the sequence |
124 | 125 |
125 double oldest() const; // the oldest valid value in the sequence | 126 double oldest() const; // the oldest valid value in the sequence |