key: memory address(int) or register name(str)
        size: size of object in bytes
353493
def sim(self, key, size=None):
        '''
        
        '''
        project = load_project()
        if key in project.arch.registers:
            if size is None:
                size = project.arch.registers[key][1]
            size *= 8
            s = claripy.BVS("angrdbg_reg_" + str(key), size)
            setattr(self.state.regs, key, s)
            self.symbolics[key] = (s, size)
        elif isinstance(key, int) or isinstance(key, long):
            if size is None:
                size = project.arch.bits
            else:
                size *= 8
            s = claripy.BVS("angrdbg_mem_" + hex(key), size)
            self.state.memory.store(key, s)
            self.symbolics[key] = (s, size)
        elif isinstance(key, claripy.ast.bv.BV):
            key = self.state.solver.eval(key, cast_to=int)
            self.sim(key, size)
        else:
            raise ValueError(
                "key must be a register name or a memory address, not %s" % str(
                    type(key)))
        return key
344689
def Size(self):
        
        return s.uint32 + 12 + s.uint32 + s.uint32 + len(self.Payload)
678946
def getsizeof(o, ids=None):
    '''
    
    '''
    ids = ids or set()
    if id(o) in ids:
        return 0

    nbytes = sys.getsizeof(o)
    ids.add(id(o))

    if isinstance(o, Mapping):
        return nbytes + sum(getsizeof(k, ids) + getsizeof(v, ids)
                            for k, v in o.items())
    elif isinstance(o, Container):
        return nbytes + sum(getsizeof(x, ids) for x in o)

    return nbytes
1283744
def memory_usage(self, string=False):
        
        if string:
            n = getsizeof(self)
            return ' '.join((str(s) for s in convert_bytes(n)))
        return self.info()['size']
1369790
def sizeof(s):
    
    if hasattr(s, '_size_'):
        return s._size_

    elif isinstance(s, bytes):
        return len(s)

    raise ValueError(s)
37191
def magic_memory(self, line):
        
        # TODO add support for directives
        message = ""
        for address in [i.strip() for i in line.replace(',', '').split()]:
            if '-' in address:
                # We have a range (n-k)
                m1, m2 = address.split('-')
                n1 = re.search(self.interpreter.IMMEDIATE_NUMBER, m1).groups()[0]
                n2 = re.search(self.interpreter.IMMEDIATE_NUMBER, m2).groups()[0]
                n1 = self.interpreter.convert_to_integer(n1)
                n2 = self.interpreter.convert_to_integer(n2)
                for i in range(n1, n2 + 1):
                    val = self.interpreter.memory[i]
                    val = self.convert_representation(val)
                    message += "{}: {}\n".format(str(i), val)
            else:
                # TODO fix what is the key for memory (currently it's an int, but registers are strings, should it be the same?)
                val = self.interpreter.memory[self.interpreter.convert_to_integer(address)]
                val = self.convert_representation(val)
                message += "{}: {}\n".format(address, val)
        stream_content = {'name': 'stdout', 'text': message}
        self.send_response(self.iopub_socket, 'stream', stream_content)
266066
def calculate_size(name, new_value):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += LONG_SIZE_IN_BYTES
    return data_size
917354
def size(self):
        
        return int(self._client.hget(self._bucket_key, self.key_prefix) or 0)
979842
def calculate_size(name, values):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += INT_SIZE_IN_BYTES
    for values_item in values:
        data_size += calculate_size_data(values_item)
    return data_size
542879
def get_size(self, name: str) -> int:
        """"""
        crc32 = binascii.crc32(name.encode())
        if crc32 in self.crc32_map:
            return self.crc32_map[crc32]

        if name in self.name_map:
            return self.name_map[name]

        return 0
650477
def size(self,value):
        '''
        
        '''
        if not self.params:
            self.params = dict(size=value)
            return self
        self.params['size'] = value
        return self
236101
public void putMemorySize(String key, MemorySize size) {
		checkNotNull(key);
		checkNotNull(size);
		put(key, size.toString());
	}
27759
def size(cls, pid):
        
        with cls._lock:
            cls._ensure_pool_exists(pid)
            return len(cls._pools[pid])
58783
def _getsize_from_header(self, header):
        
        # By default, assumes that information are in a standard HTTP header
        for key in self._SIZE_KEYS:
            try:
                return int(header.pop(key))
            except KeyError:
                continue
        else:
            raise UnsupportedOperation('getsize')
75300
def calculate_size(uuid, address, interrupt):
    
    data_size = 0
    data_size += calculate_size_str(uuid)
    data_size += calculate_size_address(address)
    data_size += BOOLEAN_SIZE_IN_BYTES
    return data_size
902208
def calculate_size(name, key):
    
    data_size = 0
    data_size += calculate_size_str(name)
    data_size += calculate_size_data(key)
    return data_size
1328674
function memorySizeOf(obj) {
    let bytes = 0;

    function sizeOf(obj) {
        let objClass;
        if(obj !== null && obj !== undefined) {
            switch(typeof obj) {
                case "number":
                    bytes += 8;
                    break;
                case "string":
                    bytes += obj.length * 2;
                    break;
                case "boolean":
                    bytes += 4;
                    break;
                case "object":
                    objClass = Object.prototype.toString.call(obj).slice(8, -1);
                    if(objClass === "Object" || objClass === "Array") {
                        for(let key in obj) {
                            bytes += key.length * 2;
                            if(!obj.hasOwnProperty(key)) continue;
                            sizeOf(obj[key]);
                        }
                    } else {
                        bytes += obj.toString().length * 2;
                    }
                    break;
            }
        }
        return bytes;
    }

    function formatByteSize(bytes) {
        if(bytes < 1024) return { bytes: bytes, value: bytes, unit: "Bytes" };
        else if(bytes < 1048576) return { bytes: bytes, value: (bytes / 1024).toFixed(3), unit: "KB" };
        else if(bytes < 1073741824) return { bytes: bytes, value: (bytes / 1048576).toFixed(3), unit: " MB" };
        else return { bytes: bytes, value: (bytes / 1073741824).toFixed(3), unit: " GB"};
    }

    return formatByteSize(sizeOf(obj));
}