Reuse memory segments in ObjectSwapper?

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Reuse memory segments in ObjectSwapper?

Postby Michael Keppler » Wed Nov 12, 2008 3:15 am

Hi,

we have a use case where the ObjectSwapper loads many objects from an external file. I noticed during profiling that around 30 to 40 percent of the needed runtime in that use case are caused by deleting memory segments in the ObjectSwapper. I already tried to do the deletion in batches, but that didn't change the needed time. My next idea was to reuse the EsMemorySegments instead of deleting and recreating them all the time. But as this involves the memory of the virtual machine, I guess this will cause trouble with the memory structure management outside my Smalltalk world.
Can someone tell me whether "reusing" of memory segments is possible (and if so, under which conditions) or does someone have another idea of how to avoid that heavy memory segment creation and deletion?

Ciao and Thanks, Michael
Michael Keppler
 
Posts: 28
Joined: Wed Feb 27, 2008 4:33 am

Re: Reuse memory segments in ObjectSwapper?

Postby tc » Wed Nov 12, 2008 7:56 am

Hello,

I have no direct experience in doing what you are trying to do but after reading it, my first thought would be to take a different approach, such as increase the size of the new space using the "-mn" command line option and set it to 1MB, maybe.

--g
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: Reuse memory segments in ObjectSwapper?

Postby Michael Keppler » Wed Dec 10, 2008 4:51 am

Thanks. We already use customized memory parameters. But that doesn't seem to help. If I understand it right, this is because the ObjectSwapper always creates segments which have the same size like the bytestream it wants to load from disk. So the memory size parameters are not applied in that case.
Michael Keppler
 
Posts: 28
Joined: Wed Feb 27, 2008 4:33 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest