edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Adam Thompson <arthompson1990@gmail.com>
To: Robert Ransom <rransom.8774@gmail.com>
Cc: Karl Dahlke <eklhad@comcast.net>, Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Object identifiers
Date: Mon, 24 Jul 2017 17:45:01 +0000	[thread overview]
Message-ID: <20170724174442.GB20415@odin> (raw)
In-Reply-To: <CABqy+soWApyCX0FCbmjcP_v4zC8--PFCykD-a-YLGojjNbY3eg@mail.gmail.com>

On Mon, Jul 24, 2017 at 01:43:40AM -0400, Robert Ransom wrote:
> On 7/23/17, Karl Dahlke <eklhad@comcast.net> wrote:
> 
> > Just a sequence number that we put on every object we care about, and an
> > array to map back from sequence number to the object.
> 
> The traditional approach is to use a 'handle', consisting of
> a small array index together with a short check value.
> Each array index contains a counter of the number of times
> the object at that index has been freed.
> When a handle is created, its check value is set to that counter;
> when the object associated with a handle is accessed,
> the check value must be equal to the counter's current value.

This sounds like what we need here.  It's more work but worth it I think.  I'm not entirely sure how we'll keep the two sets of objects in sync but it's certainly a solvable problem.

> For debugging purposes, a list of every handle created
> with a description of the objects each handle referenced
> could be stored compressed in memory or logged to a file.

Agreed, that'd help a lot.

      reply	other threads:[~2017-07-24 17:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  0:52 Karl Dahlke
2017-07-24  1:04 ` Chris Brannon
2017-07-24  5:25 ` Dominique Martinet
2017-07-24  6:43   ` Karl Dahlke
2017-07-24  7:49     ` Dominique Martinet
2017-07-24  7:03   ` Karl Dahlke
2017-07-24  5:43 ` Robert Ransom
2017-07-24 17:45   ` Adam Thompson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170724174442.GB20415@odin \
    --to=arthompson1990@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    --cc=eklhad@comcast.net \
    --cc=rransom.8774@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).