You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by li...@apache.org on 2023/02/27 08:29:40 UTC

[tomcat] branch 8.5.x updated: Fix a bug that memory allocation is larger than limit in SynchronizedStack to reduce memory footprint.

This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new dadd323662 Fix a bug that memory allocation is larger than limit in SynchronizedStack to reduce memory footprint.
dadd323662 is described below

commit dadd323662a52e4ef7d7c0f37cac477fb106502e
Author: lihan <li...@apache.org>
AuthorDate: Mon Feb 27 16:29:31 2023 +0800

    Fix a bug that memory allocation is larger than limit in SynchronizedStack to reduce memory footprint.
---
 java/org/apache/tomcat/util/collections/SynchronizedStack.java | 2 +-
 webapps/docs/changelog.xml                                     | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/collections/SynchronizedStack.java b/java/org/apache/tomcat/util/collections/SynchronizedStack.java
index f178b02048..526c44cef5 100644
--- a/java/org/apache/tomcat/util/collections/SynchronizedStack.java
+++ b/java/org/apache/tomcat/util/collections/SynchronizedStack.java
@@ -52,7 +52,7 @@ public class SynchronizedStack<T> {
             this.size = size;
         }
         this.limit = limit;
-        stack = new Object[size];
+        stack = new Object[this.size];
     }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index da9612398f..27095f5b27 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 8.5.87 (schultz)" rtext="in development">
+  <subsection name="General">
+    <changelog>
+      <fix>
+        Fix a bug that memory allocation is larger than limit in
+        <code>SynchronizedStack</code> to reduce memory footprint. (lihan)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Catalina">
     <changelog>
       <update>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org