# File lib/core/world.rb, line 157
  def memstats
    # initialize all counters
    rooms = objs = chars = accounts = scripts = strcount = strsize = ocount = 0

    # scan the ObjectSpace counting things
    ObjectSpace.each_object do |x|
      case x
      when String
        strcount += 1
        strsize += x.size
      when Character
        chars += 1
      when Account
        accounts += 1
      when Room
        rooms += 1
      when GameObject
        objs += 1
      when Script
        scripts += 1
      else
        ocount += 1
      end
    end

    # our report  :
    # :NOTE: sprintf would be better
    memstats="[COLOR Cyan]\n----* Memory Statistics *----\n  Rooms      - \#{rooms}\n  Objects    - \#{objs}\n  Scripts    - \#{scripts}\n  Accounts   - \#{accounts}\n  Characters - \#{chars}\n-----------------------------\n  Strings - \#{strcount}\n     size - \#{strsize} bytes\n  Other   - \#{ocount}\n-----------------------------\n  Total Objects - \#{rooms+objs+chars+accounts+scripts+strcount+ocount}\n----*                   *----\n[/COLOR]\n"
  end