![]() |
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 | |||
) |
str memory_leaks.alloc_regex = r"([a-zA-Z0-9_\->\.\[\]]+) = (dt_|c|m|dt_opencl_)alloc.*\(.+\)" |
memory_leaks.alloc_type = match.group(2) |
memory_leaks.allocs = len(matches2) |
str memory_leaks.buffer_type = "" |
memory_leaks.content = f.read() |
str memory_leaks.directory = "../src/iop/" |
memory_leaks.f = open(os.path.join(directory, file), "r") |
int memory_leaks.faulty_allocs = 0 |
memory_leaks.frees = len(matches3) |
memory_leaks.matches = re.finditer(alloc_regex, content, re.MULTILINE) |
memory_leaks.matches2 = re.findall(variable_alloc_regex, content, re.MULTILINE) |
memory_leaks.matches3 = re.findall(variable_free_regex, content, re.MULTILINE) |
str memory_leaks.msg_type = "INFO" |
int memory_leaks.safe_allocs = 0 |
int memory_leaks.suspicious_allocs = 0 |
str memory_leaks.variable_alloc_regex = " %s = %salloc.*\(.+\)" % (variable_name, alloc_type) |
str memory_leaks.variable_free_regex = r"" |
memory_leaks.variable_name = match.group(1) |