473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Moving memory blocks and updating references

hi, I know this is a much-travelled subject, but I was wondering what
people's thoughts were on the bare minimum (and conversely the grand
scheme) for augmenting standard memory references to handle moving
objects around in memory (as is needed in compaction algorithms
associated with 'moving collection' aka 'copy collection').

There are a number of ways to handle this without affecting the
overarching structure of one's program (albeit naive or brute force),
like overloading 'dumb' pointer operators so assignments and copies
invoke the storing of the new reference in a big table. Thusly when a
move is performed on data starting at pointer X, X's references are
extracted from the table and the new location is updated for each of
those references.

A second approach I've seen is creating redirecting 'detour' pointers
that point to the new location after the move. I'm not sure I
completely understand how this works, but topically it seems to make a
mess of memory by leaving these little 4-byte (uint ~= void*) 'bread
crumbs' all over the place.

The most frequent tactics I've seen mentioned are the use of smart
and/or master pointers (possibly evolving to handles). Is this the
best way? It seems like a substantial investment for having to change
the way everything in the existing codebase handles memory references
(not to mention if 3rd party libraries sneak around it), and I'm not
100% sure I understand how it makes moving objects possible (and
easier?).

If memory gurus can impart their thoughts on the pro and con of
various approaches used to facilitate moving blocks of memory with
existing references in the client application, I'd be much obliged.

Thanks for the help!
Jul 19 '05 #1
0 1900

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Sean Shanny | last post by:
To all, The facts: PostgreSQL 7.4.0 running on BSD 5.1 on Dell 2650 with 4GB RAM, 5 SCSI drives in hardware RAID 0 configuration. Database size with indexes is currently 122GB. Schema for...
9
by: Kev | last post by:
I've been trying to understand the article "Identifying Memory Leaks in the Common Language Runtime" listed on http://support.microsoft.com/?id=318263 It says "The garbage collector can collect...
5
by: Aaron Birkland | last post by:
I have a long but straightforward query (on some very large tables) that always ends in 'Memory exhausted in AllocSetAlloc(108)'. Even stranger are some messages that appear in the logfile, such...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
11
by: ulyses | last post by:
Let's assume I have following file: 2938929384902491233..... 923949919199191919112.... File contains INTs only. What is more they are huge. For example first row in file may contain integer...
8
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of...
2
by: Paul | last post by:
I am moving an existing app written years ago to a new server. It uses Sigma Template 1.3 and Quickform 1.1.1 and PEAR.php,v 1.1.1.1 2004/02/16 The directory structure is like this: /site...
6
by: Ark Khasin | last post by:
My pet project is a command-line utility (preprocessor), so it runs and terminates. It uses lots of memory allocations; most of them are quite small. What to do with the allocated objects when they...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.