Search notes:

Oracle: DBMS_SPACE.FREE_BLOCKS

dbms_space.free_blocks return the number of free blocks in tables, indexes or clusters.
declare
   free_blocks   number;
begin
   dbms_space.free_blocks (
      segment_owner     => user,
      segment_name      =>'TAB',
      segment_type      =>'TABLE',
      freelist_group_id => 1,
      free_blks         => free_blocks
--    scan_limit        => …
--    partition_name    => …
   );

   dbms_output.put_line('Free blocks: ' || free_blocks);
end;
/

ORA-10618

ORA-10618: Operation not allowed on this segment
ORA-06512: at "SYS.DBMS_SPACE", line 212
…
10618. 00000 -  "Operation not allowed on this segment"
*Cause:    This DBMS_SPACE operation is not permitted on segments in
           tablespaces with AUTO SEGMENT SPACE MANAGEMENT
*Action:   Recheck the segment name and type and re-issue the statement

See also

dbms_space

Index