anchor.diff:              print *, (logical_arr_size + addl_num_entries)
   #endif
               
  -            allocate(tmp(logical_arr_size + addl_num_entries))
  +            allocate(tmp(new_size))
               tmp(1:logical_arr_size) = arr
               deallocate(arr)
  -            allocate(arr(logical_arr_size + addl_num_entries))
  +            allocate(arr(new_size))
               arr = tmp
   #ifdef _DEBUG_MEM_
               call debug("[logical] Final size:")
  
positive.code:             integer(i_llong),intent(in) :: addl_num_entries
              
              integer(i_short), dimension(:), allocatable   :: tmp
              
              allocate(tmp(size(arr) + addl_num_entries))
              tmp(1:size(arr)) = arr
              deallocate(arr)
              allocate(arr(size(tmp)))
              arr = tmp
          end subroutine nc_diag_realloc_short
          
  
negative.code:             real(r_single), dimension(:), allocatable, intent(inout) :: arr
              integer(i_llong),intent(in) :: addl_num_entries
              
              real(r_single), dimension(:), allocatable    :: tmp
              integer(i_llong)                             :: new_size
              
              integer(i_byte)                              :: alloc_err
              character(len=100)                           :: err_msg
              
              new_size = size(arr) + addl_num_entries
              
              allocate(tmp(new_size), STAT=alloc_err)
              if (alloc_err /= 0) then
                  write(err_msg, "(A, I0)") "Reallocator was unable to reallocate memory! Error code: ", alloc_err
                  call error(trim(err_msg))
              end if
              tmp(1:size(arr)) = arr
              deallocate(arr)
              allocate(arr(new_size))
              arr = tmp
          end subroutine nc_diag_realloc_rsingle
          
  