Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 149742 Details for
Bug 292267
OutOfMemoryError during workspace refresh due to leak in UnifiedTree
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch against R3_5_maintenance
bug292267_oome_v2.diff.txt (text/plain), 3.38 KB, created by
Martin Oberhuber
on 2009-10-16 08:40:34 EDT
(
hide
)
Description:
Updated patch against R3_5_maintenance
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2009-10-16 08:40:34 EDT
Size:
3.38 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.resources >Index: src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java,v >retrieving revision 1.23 >diff -u -r1.23 UnifiedTreeNode.java >--- src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java 18 Mar 2009 11:02:11 -0000 1.23 >+++ src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java 16 Oct 2009 12:40:04 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Martin Oberhuber (Wind River) - [292267] OutOfMemoryError due to leak in UnifiedTree > *******************************************************************************/ > package org.eclipse.core.internal.localstore; > >@@ -108,6 +109,17 @@ > this.fileInfo = info; > this.existsWorkspace = existsInWorkspace; > } >+ >+ /** >+ * Releases elements that won't be needed any more for garbage collection. >+ * Should be called before adding a node to the free list. >+ */ >+ public void releaseForGc() { >+ this.child = null; >+ this.resource = null; >+ this.store = null; >+ this.fileInfo = null; >+ } > > public void setExistsWorkspace(boolean exists) { > this.existsWorkspace = exists; >Index: src/org/eclipse/core/internal/localstore/UnifiedTree.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTree.java,v >retrieving revision 1.47 >diff -u -r1.47 UnifiedTree.java >--- src/org/eclipse/core/internal/localstore/UnifiedTree.java 18 Mar 2009 11:02:11 -0000 1.47 >+++ src/org/eclipse/core/internal/localstore/UnifiedTree.java 16 Oct 2009 12:40:04 -0000 >@@ -9,6 +9,7 @@ > * IBM Corporation - initial API and implementation > * Martin Oberhuber (Wind River) - [105554] handle cyclic symbolic links > * Martin Oberhuber (Wind River) - [232426] shared prefix histories for symlinks >+ * Martin Oberhuber (Wind River) - [292267] OutOfMemoryError due to leak in UnifiedTree > *******************************************************************************/ > package org.eclipse.core.internal.localstore; > >@@ -107,8 +108,14 @@ > addNodeChildrenToQueue(node); > else > removeNodeChildrenFromQueue(node); >- //allow reuse of the node >- freeNodes.add(node); >+ //allow reuse of the node, but don't let the freeNodes list grow infinitely >+ if (freeNodes.size() < 32767) { >+ //free memory-consuming elements of the node for garbage collection >+ node.releaseForGc(); >+ freeNodes.add(node); >+ } >+ //else, the whole node will be garbage collected since there is no >+ //reference to it any more. > } > } > >@@ -171,7 +178,9 @@ > } else if (comp > 0) { > // resource exists only in file system > //don't create a node for symbolic links that create a cycle >- if (!localInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK) || !localInfo.isDirectory() || !isRecursiveLink(node.getStore(), localInfo)) >+ if (localInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK) && localInfo.isDirectory() && isRecursiveLink(node.getStore(), localInfo)) >+ child = null; >+ else > child = createChildNodeFromFileSystem(node, localInfo); > localIndex++; > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 292267
:
149537
| 149742