[kea-dev] Strange behaviour with Option 53 - what am I missing?

Francis Dupont fdupont at isc.org
Wed Jan 31 14:14:20 UTC 2018


Dave Cole writes:
> I was hoping to be able to minimise the amount of extra work done by the bi=
> nding, so eliminating unnecessary object allocation / destruction would be =
> a good thing.  I recently had a play with exposing the shared_ptr use_count=
>  to confirm a behaviour I was seeking.  It turns out that the shared_ptr wo=
> rks very nicely with Python wrapping.

=> from the time (more than 30 years ago) I was a CS researcher working
on garbage collection I got a bad opinion about reference counting:
 - expensive in space (need to store the reference count in each object)
 - expensive in time (need to increment and decrement the reference count
  with an atomic operation at each reference change)
 - unbound delay when releasing the last reference
 - too easy to break with cycles
 - fragment memory (vs compact memory)
So it is clearly the worst garbage collection system. But both shared pointers
and C Python are based on reference counting so they work together without
problems...

BTW I didn't forget your concern about hook support in Kea using dlopen()
with RTLD_LOCAL (vs RTLD_GLOBAL) flag. I'll try to do something about this
in 1.4-final or 1.5 milestone...

Thanks

Francis Dupont <fdupont at isc.org>


More information about the kea-dev mailing list