resources/memory/memory_limit.rb
# Returns the application's memory limit.
#
# @return [MemorySize, nil] the application's memory limit or nil if no memory limit has been provided
Returns the application's memory limit.
Returns the application ' s memory limit .
def memory_limit
      memory_limit = ENV['MEMORY_LIMIT']
      return nil unless memory_limit
      memory_limit_size = MemorySize.new(memory_limit)
      raise "Invalid negative $MEMORY_LIMIT #{memory_limit}" if memory_limit_size < 0
      memory_limit_size
    end
def memory_limit memory_limit = ENV [ 'MEMORY_LIMIT' ] return nil unless memory_limit memory_limit_size = MemorySize . new ( memory_limit ) raise "Invalid negative $MEMORY_LIMIT #{memory_limit}" if memory_limit_size < 0 memory_limit_size end
Returns the application's memory limit.
Returns the application ' s memory limit .
the application's memory limit or nil if no memory limit has been provided
the application ' s memory limit or nil if no memory limit has been provided
MemorySize, nil