Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332086 - OMF readers have a memory leak
Summary: OMF readers have a memory leak
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 16:08 EST by Dave Russo CLA
Modified: 2012-01-24 13:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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, ....).