>>>>> "Miloslaw" == Miloslaw Smyk <[EMAIL PROTECTED]> writes:
[...]
> But I meant something different, forgive me for phrasing it poorly.

No sweat!

> I have an image synthesis app that creates hundreds of thousands of
> objects at the beginning, and later it only gets worse. If I knew how
> much memory I'm wasting with each object created, e.g. how heavy is full
> OO approach vs.  putting some stuff in tables, I'd be able to tune my app
> better. Currently I've no idea if for example making all my pixels into
> objects is really hard on memory. I can gather some information from "ps
> aux", but it's really imprecise.

> So: can anyone tell me how much memory overhead hotspot adds for each
> object created under Linux JVM? If it is not constant value I'd
> appreciate even a ballpark figure.

If that's all you want then you only need to run some empirical tests for
whatever JRE that you're using...

Write a test application that loads e.g., a specified image 100 times --
check the memory size before and after you're done loading.  The write a
batch file that runs your test application with a representative set of the
different images that your application uses (i.e., big ones, little ones,
whatever).  Remember to e.g., divide by 100. :-)

Hope this helps,
                John


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to