On Mon, Jul 24, 2017 at 01:43:40AM -0400, Robert Ransom wrote:
> On 7/23/17, Karl Dahlke <[email protected]> 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.
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to