def _get_memory_bank_size(memBank):
    fileName = '/sys/devices/system/node/node{0}/meminfo'.format(memBank)
    size = None
    with open(fileName) as f:
        for line in f:
            if 'MemTotal' in line:
                size = line.split(':')[1].strip()
                if size[-3:] != ' kB':
                    raise ValueError('"{}" in file {} is not a memory size.'.format(size, fileName))
                size = int(size[:-3]) * 1024 # kernel uses KiB but names them kB, convert to Byte
                logging.debug("Memory bank %s has size %s bytes.", memBank, size)
                return size
    raise ValueError('Failed to read total memory from {}.'.format(fileName))
parse config files
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/resources.py/_get_memory_bank_size--crossover with--dataset/ETHPy150Open gawel/irc3/irc3/utils.py/parse_config