Function report |
Source Code:mm\memcontrol.c |
Create Date:2022-07-28 16:09:38 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mem_cgroup_margin - calculate chargeable space of a memory cgroup*@memcg: the memory cgroup* Returns the maximum amount of memory @mem can be charged with, in* pages.
Proto:static unsigned long mem_cgroup_margin(struct mem_cgroup *memcg)
Type:unsigned long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct mem_cgroup * | memcg |
| 1291 | margin = 0 |
| 1295 | count = page_counter_read( & Accounted resources ) |
| 1300 | If Whether legacy memory+swap accounting is active Then |
| 1301 | count = page_counter_read( & Legacy consumer-oriented counters ) |
| 1303 | If count <= limit Then margin = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(margin, limit - count) |
| 1305 | Else margin = 0 |
| 1309 | Return margin |
| Name | Describe |
|---|---|
| try_charge |
| 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 |