Jump to content

Memory concerns with OOP


Recommended Posts

Hi!

as my projects become larger, I feel that OOP is the way to go in the future.

However my concerns are with memory management. I have to deal with large data junks, means 4x2 MB of 16 bit integers that need to be converted to doubles, in order to do the number crunching needed. In total that makes 64 MB just to hold one copy of the data.

Following the recommendations, published on the internet, I actually store the data in smaller junks in a queue and do all "junkable" operations in for loops.

Now my question is: Using OOP, do I have to use queues as well to avoid unnecessary data copies or is OOP freeing me at least from some of my concerns? In other words, is there some resource to find out, when data copies are produced in OOP and when the processing occurs in place?

Thanks

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.