Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:41:32+00:00 2026-05-26T02:41:32+00:00

I’m currently working on a generational garbage collector. This means that only the most

  • 0

I’m currently working on a generational garbage collector. This means that only the most recent objects get traversed, surviving objects (= reachable from known roots) being promoted to the older generation. This works OK when objects point to other objects of the same or older generations. However, when older objects point to newer ones, and since only newer objects get traversed, the pointed objects would be incorrectly collected. To avoid this, such objects are marked and traversed explicitly during each GC phase.

Obviously such “parent” objects are mutable, since by construction immutable ones always point to existing objects. So to become a “parent”, an object has to be modified after being promoted, so that it points to a newer object.

To know which objects of older generations point to younger generations, I am looking for a way to monitor memory changes transparently. To do so I use memory protection and signal/exception handling. Memory pages are set read-only, which causes a signal/exception to be raised whenever they are written, in which case I set the memory protection back to read-write and log the address somewhere for further processing, and upon return the code responsible for the exception resumes normally. That way, when the GC triggers, I know where to look to find potential parents to traverse.

On Linux I use a combination of mprotect/SIGSEGV signal handling. On Windows I intend to use VirtualProtect but found no equivalent of SIGSEGV handling. So my questions:

  1. How would you do that on Windows? The exception handling API seems rather confusing.

  2. Is there a better way to know which memory areas get modified, so that I don’t have to do all this bookkeeping?

My code is written in plain C. At present I require caller code to explicitly mark modified objects, but this is tedious and error-prone so I’m looking for a transparent way to do it.

Thanks in advance, Fred

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:41:33+00:00Added an answer on May 26, 2026 at 2:41 am

    GetWriteWatch is ideal for this.
    Documentation here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.