Function report |
Source Code:lib\refcount.c |
Create Date:2022-07-28 06:25:20 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:refcount_warn_saturate
Proto:void refcount_warn_saturate(refcount_t *r, enum refcount_saturation_type t)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
refcount_t * | r | |
enum refcount_saturation_type | t |
18 | Case t == REFCOUNT_ADD_NOT_ZERO_OVF |
19 | REFCOUNT_WARN("saturated; leaking memory") |
20 | Break |
21 | Case t == REFCOUNT_ADD_OVF |
22 | REFCOUNT_WARN("saturated; leaking memory") |
23 | Break |
24 | Case t == REFCOUNT_ADD_UAF |
25 | REFCOUNT_WARN("addition on 0; use-after-free") |
26 | Break |
27 | Case t == REFCOUNT_SUB_UAF |
28 | REFCOUNT_WARN("underflow; use-after-free") |
29 | Break |
30 | Case t == REFCOUNT_DEC_LEAK |
31 | REFCOUNT_WARN("decrement hit 0; leaking memory") |
32 | Break |
33 | Default |
34 | REFCOUNT_WARN("unknown saturation event!?") |
Name | Describe |
---|---|
refcount_add_not_zero | _add_not_zero - add a value to a refcount unless it is 0*@i: the value to add to the refcount*@r: the refcount* Will saturate at REFCOUNT_SATURATED and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the |
refcount_add | _add - add a value to a refcount*@i: the value to add to the refcount*@r: the refcount* Similar to atomic_add(), but will saturate at REFCOUNT_SATURATED and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the |
refcount_sub_and_test | _sub_and_test - subtract from a refcount and test if it is 0*@i: amount to subtract from the refcount*@r: the refcount* Similar to atomic_dec_and_test(), but it will WARN, return false and* ultimately leak on underflow and will fail to decrement when |
refcount_dec | _dec - decrement a refcount*@r: the refcount* Similar to atomic_dec(), it will WARN on underflow and fail to decrement* when saturated at REFCOUNT_SATURATED.* Provides release memory ordering, such that prior loads and stores are done* before. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |