Function report |
Source Code:mm\kmemleak.c |
Create Date:2022-07-28 16:22:34 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:File write operation to configure kmemleak at run-time
Proto:static ssize_t kmemleak_write(struct file *file, const char __user *user_buf, size_t size, loff_t *ppos)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | file | |
| const char __user * | user_buf | |
| size_t | size | |
| loff_t * | ppos |
| 1774 | buf_size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(size, ( size of buf - 1)) |
| 1775 | If Copy a NUL terminated string from userspace < 0 Then Return -EFAULT |
| 1779 | ret = mutex_lock_interruptible( & protects the memory scanning, parameters and debug/kmemleak file access ) |
| 1786 | Else __kmemleak_do_cleanup() |
| 1788 | Go to out |
| 1791 | If Not set if tracing memory operations is enabled Then |
| 1796 | If strncmp(buf, "off", 3) == 0 Then kmemleak_disable() |
| 1798 | Else if strncmp(buf, "stack=on", 8) == 0 Then ables or disables the task stacks scanning = 1 |
| 1800 | Else if strncmp(buf, "stack=off", 9) == 0 Then ables or disables the task stacks scanning = 0 |
| 1802 | Else if strncmp(buf, "scan=on", 7) == 0 Then Start the automatic memory scanning thread. This function must be called* with the scan_mutex held. |
| 1804 | Else if strncmp(buf, "scan=off", 8) == 0 Then Stop the automatic memory scanning thread. |
| 1813 | If secs Then |
| 1819 | Else if strncmp(buf, "dump=", 5) == 0 Then ret = dump_str_object_info(buf + 5) |
| 1824 | out : |
| 1831 | Return size |
| 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 |