(self, address, size, sort)
Include a block, specified by (address, size), in this segment list.

        :param int address:     The starting address of the block.
        :param int size:        Size of the block.
        :param str sort:        Type of the block.
        :return: None
Include a block, specified by (address, size), in this segment list.
Include a block specified by ( address size ) in this segment list .
def occupy(self, address, size, sort):
        """
        Include a block, specified by (address, size), in this segment list.

        :param int address:     The starting address of the block.
        :param int size:        Size of the block.
        :param str sort:        Type of the block.
        :return: None
        """

        if size is None or size <= 0:
            # Cannot occupy a non-existent block
            return

        # l.debug("Occpuying 0x%08x-0x%08x", address, address + size)
        if not self._list:
            self._list.append(Segment(address, address + size, sort))
            self._bytes_occupied += size
            return
        # Find adjacent element in our list
        idx = self.search(address)

        self._insert_and_merge(address, size, sort, idx)
def occupy ( self , address , size , sort ) : if size is None or size <= 0 : # Cannot occupy a non-existent block return # l.debug("Occpuying 0x%08x-0x%08x", address, address + size) if not self . _list : self . _list . append ( Segment ( address , address + size , sort ) ) self . _bytes_occupied += size return # Find adjacent element in our list idx = self . search ( address ) self . _insert_and_merge ( address , size , sort , idx )