World's most popular travel blog for travel bloggers.

[Solved]: What is a forwarding pointer?

, , No Comments
Problem Detail: 

I heard this terminology used today and haven't come across it before, could someone please explain?

Are there any other terms/names that describe this concept?

Asked By : jcm

Answered By : babou

"Forwarding pointer" is the name of a technique used in garbage collection algorithms when data cells are being moved to a different storage location, either because you are using a copying collection technique such as Cheney's collector, or because you are doing a compaction phase to reduce memory fragmentation. Compaction is usually associated with mark-and-sweep collectors, but it could be used in other contexts, though the care required by forwarding pointers may entail overhead that is more naturally acceptable with mark-and-sweep.

The forwarding pointer replaces the data cell that has been moved, so that any piece of code trying to access that cell through its old address can find the forwarding pointer to the new address. Exactly like a person moving to a new house will leave her new address on the mailbox (or at the post-office) of her old house. Of course, the code and data must be organized so that forwarding pointers may be recognized as such.

As far as I know, this was historically the first widespread use of the concept of forwarding pointer. But the idea of using forwarding pointers can be considered, and has been considered in other situations that require moving data to a different location, for example:

  • The concept is used in mobile computing when an agent moves to a different location (agency) and must still receive messages sent to its former location.

  • The concept is also used in data-base implementation when the organization and management of data requires moving some part of it to another location.

Basically, forwarding pointers are a way of reorganizing incrementally the storage structures or system organizations without disrupting (too much) on going computations, and avoiding a complete sweep of the system space, by leaving the new address of moved constituents at their former location.

(You could have found some of that yourself by searching the web and wikipedia).

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/30208

0 comments:

Post a Comment

Let us know your responses and feedback