On Wed, Jan 20, 2016 at 8:08 PM, Yury Selivanov <yselivanov.ml at gmail.com> wrote: > > On 2016-01-20 2:02 PM, Maciej Fijalkowski wrote: >> >> On Wed, Jan 20, 2016 at 8:00 PM, Yury Selivanov <yselivanov.ml at gmail.com> >> wrote: >> > [..] >>>> >>>> Brett, you need two things - the ID of the dict and the version tag. >>>> What we do in pypy is we have a small object (called, surprisingly, >>>> VersionTag()) and we use the ID of that. That way you can change the >>>> version id of an existing dict and have only one field. >>> >>> Yeah, that's essentially what I propose with ma_extra. >>> >>> Yury >> >> The trick is we use only one field :-) >> >> you're proposing to have both fields - version tag and dict id. Why >> not just use the id of the object (without any fields)? > > > What if your old dict is GCed, its "VersionTag()" (1) object is > freed, and you have a new dict, for which a new "VersionTag()" (2) > object happens to be allocated at the same address as (1)? > > Yury > You don't free a version tag that's stored in the guard. You store the object and not id
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4