From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 9A3AF78020 for ; Mon, 24 Jul 2017 10:44:54 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id g32so748352wrd.5 for ; Mon, 24 Jul 2017 10:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JLntn067qU6mf2L4GWgkmKuzydrXlFYw2iIn1ypSThY=; b=Zzz7EqAUh5PPWc7fjU7Ws8NfUPTuGs54DS+08sKGAnF3OPHb+60TY8VAGfdTO1G6FR 9+8NlZ6pdeWhFFZrg3xKj7eUDrtC7ETy78uEF1vwhFCfRHNhNTl6x6vNhdTH+EH2gRuY eB6u7YkEOiWy8t/BovprTKIkT+9Hdh8Z1t3hYOy9hMTgpHQ7ONl83iZMb8QTIf/YsMuk gew5CzaLU872+B4jwtyN3E2PlsqR8rKzTCZPgJ/vv2pDs2WFq9SqMApJcBsAIMt+3OoK epfSgxA//Te1CsbscO0tn0h/cqbHmOyVy86MmeNNcmnhN5yvnedeftWJRLTL020L2LIi BZaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JLntn067qU6mf2L4GWgkmKuzydrXlFYw2iIn1ypSThY=; b=fkdAM5im2bUX4L0pj1B5mmHw/pR33L2GT7y9OZvB9ak3zLY4oOwysStEZWM/tHm8IW p6gNkUkPhMYPY4LPXH/imhvkh0NYsDBpq+kqkIyIZ6tfJz8YMUc1qcXjo4ULTWIRGTH+ oL8sWDfpBCuh9x+ZCou9rKnGbzNNFI6UrmUE/PVaO109lE0VScSActL167sGK3+Ig9ZL xgNhVj5ISCpQ5AegpjV6PpaGVpcQfMJ7LRreXNwL93edt648MVgp3x743DyWAxbSGa3A QY8WFHPt3W3q0t+g2tiXF8lgdTQ5oO4QIUwHqCRvUlq9YOfUhwx5ur3FimzSCs1AJP5p gPIA== X-Gm-Message-State: AIVw111MKjc41YngemA8xnV3DV8X4sQdvqzT0PuXDy9exNM3DciDbM+u V448eFqypsut9A== X-Received: by 10.223.152.47 with SMTP id v44mr16463123wrb.60.1500918308321; Mon, 24 Jul 2017 10:45:08 -0700 (PDT) Received: from odin (odin.sdf-eu.org. [178.63.35.194]) by smtp.gmail.com with ESMTPSA id v136sm113891wmv.4.2017.07.24.10.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jul 2017 10:45:07 -0700 (PDT) Date: Mon, 24 Jul 2017 17:45:01 +0000 From: Adam Thompson To: Robert Ransom Cc: Karl Dahlke , Edbrowse-dev@lists.the-brannons.com Message-ID: <20170724174442.GB20415@odin> References: <20170623205238.eklhad@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [Edbrowse-dev] Object identifiers X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 17:44:55 -0000 On Mon, Jul 24, 2017 at 01:43:40AM -0400, Robert Ransom wrote: > On 7/23/17, Karl Dahlke 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.