def free_address
      if @first_space == 0
        # There is currently no free entry. Create a new reserved entry at the
        # end of the file.
        begin
          offset = @f.size
          @f.seek(offset)
          write_n_bytes([1] + ::Array.new(@entry_bytes, 0))
          write_header
          return offset_to_address(offset)
        rescue IOError => e
          PEROBS.log.fatal "Cannot create reserved space at #{@first_space} " +
            "in EquiBlobsFile #{@file_name}: #{e.message}"
        end
      else
        begin
          free_space_address = offset_to_address(@first_space)
          @f.seek(@first_space)
          marker = read_char
          @first_space = read_unsigned_int
          unless marker == 0
            PEROBS.log.fatal "Free space list of EquiBlobsFile #{@file_name} " +
              "points to non-empty entry at address #{@first_space}"
          end
          # Mark entry as reserved by setting the mark byte to 1.
          @f.seek(-(1 + 8), IO::SEEK_CUR)
          write_char(1)

          # Update the file header
          @total_spaces -= 1
          write_header
          return free_space_address
        rescue IOError => e
          PEROBS.log.fatal "Cannot mark reserved space at " +
            "#{free_space_address} in EquiBlobsFile #{@file_name}: " +
            "#{e.message}"
        end
      end
    end
def free_address
      if @first_space == 0
        # There is currently no free entry. Create a new reserved entry at the
        # end of the file.
        begin
          offset = @f.size
          @f.seek(offset)
          write_n_bytes([1] + ::Array.new(@entry_bytes, 0))
          write_header
          return offset_to_address(offset)
        rescue IOError => e
          PEROBS.log.fatal "Cannot create reserved space at #{@first_space} " +
            "in EquiBlobsFile #{@file_name}: #{e.message}"
        end
      else
        begin
          free_space_address = offset_to_address(@first_space)
          @f.seek(@first_space)
          marker = read_char
          @first_space = read_unsigned_int
          unless marker == 0
            PEROBS.log.fatal "Free space list of EquiBlobsFile #{@file_name} " +
              "points to non-empty entry at address #{@first_space}"
          end
          # Mark entry as reserved by setting the mark byte to 1.
          @f.seek(-(1 + 8), IO::SEEK_CUR)
          write_char(1)

          # Update the file header
          @total_spaces -= 1
          write_header
          return free_space_address
        rescue IOError => e
          PEROBS.log.fatal "Cannot mark reserved space at " +
            "#{free_space_address} in EquiBlobsFile #{@file_name}: " +
            "#{e.message}"
        end
      end
    end
Return the address of a free blob storage space. Addresses start at 0
 and increase linearly.
 @return [Integer] address of a free blob space