From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-x236.google.com (mail-ua0-x236.google.com [IPv6:2607:f8b0:400c:c08::236]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 558CD78020 for ; Sun, 23 Jul 2017 22:43:28 -0700 (PDT) Received: by mail-ua0-x236.google.com with SMTP id d29so60963415uai.2 for ; Sun, 23 Jul 2017 22:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TbnWb+R9ghwuVNPl3XWT5Jv/MmhDHUn1LeuzGzlCVRc=; b=NsEqZm4hIKoTKVwcknTyp306FYoGtEa40zTYBNvAxk5/PLvGySYTlaoYo3jgA4o0CE kI3jUjXvYkhwSip8ahoXLcqGOJUcupeWk9/1Gi02QM+NJP4jpnxR169ZI3jo5aJZsUm4 KmxInR3MlxcirT5xcQ89mwyRhNJ/rvc8q4pMBSHaIW7ibTvkO8YPoU8XxtOMAjG3w22o OfjqC2OXV+CWuN2x0akloSfWcAkfFLoEn43tA0Vkw1oYKKuza9uP8W9LhDUGkjd4ca0P bUk1E0ENsny6bp2eWAOkri6sRt+RmYUitE/KuYKioBh2YoXIeYZa3HTNKCoF1iBKV6oj VTJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TbnWb+R9ghwuVNPl3XWT5Jv/MmhDHUn1LeuzGzlCVRc=; b=YhjfKP3YHcXNxOBsZVzSNQak7gpyka5eAUdxBDPALInu1UA8U6kn3nVIg5kqH+ovj2 F7L4dVBCrCu6Vc+qtamUMw1JjZ/sQzLEOyXLyRlHrv0j14rElJNH1NBIDXISk3a86Rgd mMyVF26mB+8Ah/aadeG3fZ27WKKieew7Gn3BmncxnK+JfCcj5kNg62vl5f0PL1/FFlbb uBOqPGNYpe3k/T6rGOjumpQUo4bclJ9NZqIndtIUnWZVL/JJIqy8BLhkRl4MYHS1EHSr HR65l60G7cxVi6pn/QnTjXzrnTR1CoZPTl5MkADtMYddFpNtAV1K8asP3OGm0xoYpSLw 27dg== X-Gm-Message-State: AIVw111bAKiDAyQXrqJ/SOSZvwTEhUpRHAmbsPijMDOYX7fNPWZuq9lG oUzYjPu/BN937iiry4CnS9PJFSDfZQ== X-Received: by 10.31.140.193 with SMTP id o184mr8028682vkd.92.1500875021174; Sun, 23 Jul 2017 22:43:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.3.154 with HTTP; Sun, 23 Jul 2017 22:43:40 -0700 (PDT) In-Reply-To: <20170623205238.eklhad@comcast.net> References: <20170623205238.eklhad@comcast.net> From: Robert Ransom Date: Mon, 24 Jul 2017 01:43:40 -0400 Message-ID: To: Karl Dahlke Cc: Edbrowse-dev@lists.the-brannons.com Content-Type: text/plain; charset="UTF-8" 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 05:43:28 -0000 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. 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.