Examples of using Reference counting in English and their translations into Russian
{-}
-
Official
-
Colloquial
Objective-C does not use garbage collection andinstead uses reference counting.
Reference counting is also among the simplest forms of memory management to implement.
In some cases, this can be useful,for example with caching, reference counting, and data synchronization.
Incorrect reference counting in the ping_init_sock() function allows denial of service or privilege escalation.
Felix Wilhelm of the Google Security Team discovered that the DHCP server does not properly handle reference counting when processing client requests.
Andrew Cooper discovered that incorrect reference counting with shadow paging might result in privilege escalation.
Reference counting garbage collection is where each object has a count of the number of references to it.
Jan Beulich discovered multiple places where reference counting on grant table operations was incorrect, resulting in potential privilege escalation.
Cocoa's NSObject class, from which most classes, both vendor and user,are derived, implements a reference counting scheme for memory management.
Also, less importantly, reference counting requires every memory-managed object to reserve space for a reference count. .
When the server is configured to used the RWM overlay, an attacker can make it crash by unbinding just after connecting,because of an issue with reference counting.
Automatic Reference Counting(ARC) is a memory management feature of the Clang compiler providing automatic reference counting for the Objective-C and Swift programming languages.
Since PHP allows user-land references, as created by the& operator, a zval container also has an internal reference counting mechanism to optimize memory usage.
Reference counting keeps the count of how many objects are referencing the data, and will delete it only when this count reaches zero e.g. boost:: shared ptr.
CAI Qian discovered that reference counting is not properly handled within proc_sys_readdir in the sysctl implementation, allowing a local denial of service(system hang) or possibly privilege escalation.
Reference counting is also used in file systems and distributed systems, where full non-incremental tracing garbage collection is too time consuming because of the size of the object graph and slow access speed.
Reference counting in naive form has two main disadvantages over the tracing garbage collection, both of which require additional mechanisms to ameliorate: The frequent updates it involves are a source of inefficiency.
The main advantage of the reference counting over tracing garbage collection is that objects are reclaimed as soon as they can no longer be referenced, and in an incremental fashion, without long pauses for collection cycles and with clearly defined lifetime of every object.
Simple reference counts require frequent updates.
Weighted reference counts are a good solution for garbage collecting a distributed system.
Reference counts are also useful information to use as input to other runtime optimizations.
When reference count is zero, the object is removed from memory.
Jan Beulich discovered that improper x86 shadow mode reference count error handling may result in denial of service or privilege escalation.
Whenever a reference is destroyed or overwritten, the reference count of the object it references is decremented, and whenever one is created or copied, the reference count of the object it references is incremented.
Jan Beulich discovered that an incorrect reference count overflow check in x86 shadow mode may result in denial of service or privilege escalation.
Just like before, unsetting a variable removes the symbol, and the reference count of the variable container it points to is decreased by one.
If we unset variable$a after running the above code, the reference count of the variable container that$a and element"1" point to gets decreased by one, from"2" to"1.
A WinRT object is reference counted and thus handles similarly to ordinary C++ objects enclosed in shared_ptrs.
In counting, use only one platform as both reference and counting scale.
The function returns a value by'count' reference.