<AWT Dev> Render Buffer memory usage question.
artem.ananiev at oracle.com
Tue Apr 26 03:22:51 PDT 2011
On 4/25/2011 11:44 PM, Dmitriy Likhten wrote:
> I’ve been looking around for knowledge on this, I figured the guys
> implementing might know a bit about it J Hopefully you guys can help out.
> Basically I have multiple JFrames with a single buffer strategies. I
I don't quite get what is "multiple JFrames with a single buffer
strategies". createBufferStrategy() API is per-Window, so if you have N
windows, you also have N BufferStrategy instances.
> would like to know how I can determine how much memory would be required
> just to render the buffers for those frames in Windows XP/7. The setups
> will most likely have 2-6 monitors and window sizes can be anywhere from
> a small window, to a maximized, to stretched across 6 monitors. Given
> total desktop resolution, window sizes, window positions, etc, is there
> a good strategy I can use to approximate with maybe 70%+ fidelity how
> much ram will be needed to render the windows? I would like to keep the
> ram requirements to the bare minimum (flexible but the less the better)
> needed without hitting any sort of thrashing (if that is an issue).
Why do you need this information? AWT/Swing apps don't have direct
control over BufferStrategy: you can draw to it, but cannot control if
it uses video memory, system memory, when it gets lost, etc.
Adding 2d-dev alias to CC as BufferStrategy class are mostly Java2D objects.
> Can anyone give any either formulas or rules of thumb when attempting to
> get the numbers? I’ve seen performance where strong references would be
> = max resolution under various cases, some where each window (some off
> screen) would take up max resolution size (6 monitors) etc. However this
> is all non-scientific memory profiling so I don’t know if I have a
> correct understanding of when the buffers are set to what size.
> CONFIDENTIALITY NOTICE: This message (including any attachments) is
> intended solely for the use of GFI Group Inc., its affiliates and the
> individual addressee(s). This message may contain confidential and/or
> private information privileged to recipient or recipients named above.
> If you are not the authorized recipient(s), or the employee or agent
> responsible for delivering this message to the intended recipient(s),
> please immediately notify the sender by e-mail at the address shown
> above and delete this message from your system, other storage mechanism
> and/or shred the document and any attachments. Any unauthorized use,
> review or dissemination of this message in whole or in part by persons
> or entities other than the intended recipient is strictly prohibited.
> GFI Group Inc. shall not be liable for the improper or incomplete
> transmission of the information contained in this communication nor for
> any delay in its receipt or damage to your system.
More information about the awt-dev