Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332086

Summary: OMF readers have a memory leak
Product: [Technology] RTSC Reporter: Dave Russo <d-russo>
Component: CoreAssignee: Dave Russo <d-russo>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Dave Russo CLA 2010-12-07 16:08:14 EST
The current OMF reader's cache does not limit the size of the cache and provides no mechanism for freeing/updating the cache.  As a result, these readers can consume an amount of memory equal to all strings in a specified executable.

If this is an acceptable design for OMF readers, the IOMFReader interface should be changed to eliminate the close() operation.  The original purpose of file management was to allow one to operate the OMF reader efficiently with a fixed small memory budget.  The recently added cache assumes unbounded memory is ok, contrary to the original design.

An alternative design is to create an IBufferedOMFReader that manages a cache and accepts an IOMFReader (or creates an IOMFReader) which can then be used by ROV.

This maintains compatibility, cleanly separates buffering from file formatting, and allows the cache to be used with _any_ IOMFReader (coff, elf, ....).