Пример #1
0
def get_memory_usage_info():
	count = ctypes.c_ulonglong()
	info = core.BNGetMemoryUsageInfo(count)
	result = {}
	for i in range(0, count.value):
		result[info[i].name] = info[i].value
	core.BNFreeMemoryUsageInfo(info, count.value)
	return result
Пример #2
0
def get_memory_usage_info() -> Mapping[str, int]:
    count = ctypes.c_ulonglong()
    info = core.BNGetMemoryUsageInfo(count)
    assert info is not None, "core.BNGetMemoryUsageInfo returned None"
    result = {}
    for i in range(0, count.value):
        result[info[i].name] = info[i].value
    core.BNFreeMemoryUsageInfo(info, count.value)
    return result
Пример #3
0
def get_memory_usage_info():
    count = ctypes.c_ulonglong()
    info = core.BNGetMemoryUsageInfo(count)
    result = {}
    for i in range(0, count.value):
        result[info[i].name] = info[i].value
    core.BNFreeMemoryUsageInfo(info, count.value)
    return result


#if not valid_import("binaryninjaui") and not core_ui_enabled():
#	#Use print because we're headless and log_functions won't work yet
#	print("BINARYNINJAUI module not available.\nPlease re-run the install_api.py python script (with the appropriate version of python you plan to use) to properly set up your Binary Ninja python paths.")