![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Functions | |
| find_call_and_line (elem, file, directory) | |
Variables | |
| str | directory = "../src/iop/" |
| str | alloc_regex = r"([a-zA-Z0-9_\->\.\[\]]+) = (dt_|c|m|dt_opencl_)alloc.*\(.+\)" |
| f = open(os.path.join(directory, file), "r") | |
| content = f.read() | |
| matches = re.finditer(alloc_regex, content, re.MULTILINE) | |
| int | safe_allocs = 0 |
| int | faulty_allocs = 0 |
| int | suspicious_allocs = 0 |
| variable_name = match.group(1) | |
| alloc_type = match.group(2) | |
| str | variable_alloc_regex = " %s = %salloc.*\(.+\)" % (variable_name, alloc_type) |
| matches2 = re.findall(variable_alloc_regex, content, re.MULTILINE) | |
| allocs = len(matches2) | |
| str | variable_free_regex = r"" |
| str | buffer_type = "" |
| matches3 = re.findall(variable_free_regex, content, re.MULTILINE) | |
| frees = len(matches3) | |
| str | msg_type = "INFO" |
| memory_leaks.find_call_and_line | ( | elem, | |
| file, | |||
| directory | |||
| ) |
Definition at line 36 of file memory_leaks.py.
| str memory_leaks.alloc_regex = r"([a-zA-Z0-9_\->\.\[\]]+) = (dt_|c|m|dt_opencl_)alloc.*\(.+\)" |
Definition at line 33 of file memory_leaks.py.
| memory_leaks.alloc_type = match.group(2) |
Definition at line 65 of file memory_leaks.py.
| memory_leaks.allocs = len(matches2) |
Definition at line 70 of file memory_leaks.py.
| str memory_leaks.buffer_type = "" |
Definition at line 75 of file memory_leaks.py.
| memory_leaks.content = f.read() |
Definition at line 51 of file memory_leaks.py.
| str memory_leaks.directory = "../src/iop/" |
Definition at line 31 of file memory_leaks.py.
| memory_leaks.f = open(os.path.join(directory, file), "r") |
Definition at line 50 of file memory_leaks.py.
| int memory_leaks.faulty_allocs = 0 |
Definition at line 57 of file memory_leaks.py.
| memory_leaks.frees = len(matches3) |
Definition at line 83 of file memory_leaks.py.
| memory_leaks.matches = re.finditer(alloc_regex, content, re.MULTILINE) |
Definition at line 54 of file memory_leaks.py.
| memory_leaks.matches2 = re.findall(variable_alloc_regex, content, re.MULTILINE) |
Definition at line 69 of file memory_leaks.py.
| memory_leaks.matches3 = re.findall(variable_free_regex, content, re.MULTILINE) |
Definition at line 82 of file memory_leaks.py.
| str memory_leaks.msg_type = "INFO" |
Definition at line 108 of file memory_leaks.py.
| int memory_leaks.safe_allocs = 0 |
Definition at line 56 of file memory_leaks.py.
| int memory_leaks.suspicious_allocs = 0 |
Definition at line 58 of file memory_leaks.py.
| str memory_leaks.variable_alloc_regex = " %s = %salloc.*\(.+\)" % (variable_name, alloc_type) |
Definition at line 68 of file memory_leaks.py.
| str memory_leaks.variable_free_regex = r"" |
Definition at line 74 of file memory_leaks.py.
| memory_leaks.variable_name = match.group(1) |
Definition at line 64 of file memory_leaks.py.