[vlc-devel] [PATCH v2 01/10] core: add atomic refcounter helper
robux4 at ycbcr.xyz
Mon Jul 2 18:00:59 CEST 2018
If there are some cases where this API should not be used for
refcounted, as Remi seem to imply, it would be good to document it.
If that's just an overflow issue, I don't think it's a real issue. If
you end up with int-max, uint-max, uintptr_t-max or whatever refcounted
objects it's very likely there's a leak. In fact it may be a good idea
to add some tooling to the code to detect leaks early (like 100
references ?). Which also makes the code factorizing even more useful.
On 2018-07-02 17:53, Romain Vimont wrote:
> On Mon, Jul 02, 2018 at 06:43:19PM +0300, Rémi Denis-Courmont wrote:
>> There was a protection and you removed it. By definition, we can obviously not have more uintptr_max in-memory refs.
> There was no "protection", the type was just wider. But again, it seems
> to me that this choice was arbitrary and inconsistent: there was no good
> reason to use atomic_uintptr_t at some places and atomic_uint at some
> If there was a good reason, please tell me (this is the purpose of
> reviews), so we just won't use vlc_atomic_rc_t for these 2 specific
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel