VisualWorks Smalltalk Forums
September 05, 2010, 12:32:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: NYCST presents:  Introducing Web Velocity
 
   Home   Help Search Calendar Tags Login Register  
Pages: [1]
  Print  
Author Topic: Memory used by an object  (Read 242 times)
GaryD
Newbie
*
Posts: 41


Skype me: SageOfSmeg


View Profile
« on: July 29, 2010, 04:50:56 AM »

Is there a way in VW to determine how much memory is being used by a particular object?

I realise that this may be someting of a "what if" type of question.
I ask because I would like to get an idea of how much data I can load into an image safely from a database.

---
vw7.7 nc
Windows XP Home SP3
Logged
charles
Jr. Member
**
Posts: 84



View Profile
« Reply #1 on: July 30, 2010, 12:10:05 AM »

this is really more of an issue of creating a custom memory policy to handle bulk loads gracefully. There is mechanism for counting i.e. based on how many instvars an object has  plus taking into account the object header and or course its a recursive process to understand the total weight of a particular object but I forget how things are weighted i.e. the byte count. Check out the advanced profilers parcel  there are some stats regarding memory consumption associated to a particular measured process. In a 64 bit vm the answer should be essentially any entire db could be cached in a VW image in a 32 bit vm the answer is quite a lot Smiley. In my shop we do "database caching".

hth,

Logged
GaryD
Newbie
*
Posts: 41


Skype me: SageOfSmeg


View Profile
« Reply #2 on: July 30, 2010, 03:51:31 AM »

That helps, thanks, I'll look into it.
The database I had in mind was relatively small, only around 15,000 discreet data items.

Gary
Logged
charles
Jr. Member
**
Posts: 84



View Profile
« Reply #3 on: July 30, 2010, 07:34:50 AM »

We load a lot more than that and basically do not even use a custom memory policy i.e. don't create our own subclass but rather just push the memory parameters up.
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
Twitter Mod 1.3 created by 2by2host.com - a web hosting company
Valid XHTML 1.0! Valid CSS!