resources/memory/weight_balancing_memory_heuristic.rb
# Creates an instance based on a hash containing memory settings, and the application's memory size in
# $MEMORY_LIMIT.
#
# @param [Hash<String, String>] sizes any sizes specified by the user
# @param [Hash<String, Numeric>] heuristics the memory heuristics specified by the user
# @param [Array<String>] valid_types the valid types of memory
# @param [Hash<String, String>] java_opts a mapping from a memory type to a +JAVA_OPTS+ option
Creates an instance based on a hash containing memory settings, and the application's memory size in
$MEMORY_LIMIT.
Creates an instance based on a hash containing memory settings and the application ' s memory size in $MEMORY_LIMIT .
def normalise_stack_bucket(stack_bucket, buckets)
    stack_memory      = weighted_proportion(stack_bucket, buckets)
    num_threads       = [stack_memory / stack_bucket.default_size, 1].max
    normalised_bucket = MemoryBucket.new('normalised stack', stack_bucket.weighting, stack_bucket.range * num_threads)
    [normalised_bucket, num_threads]
  end
def normalise_stack_bucket ( stack_bucket , buckets ) stack_memory = weighted_proportion ( stack_bucket , buckets ) num_threads = [ stack_memory / stack_bucket . default_size , 1 ] . max normalised_bucket = MemoryBucket . new ( 'normalised stack' , stack_bucket . weighting , stack_bucket . range * num_threads ) [ normalised_bucket , num_threads ] end
Creates an instance based on a hash containing memory settings, and the application's memory size in
$MEMORY_LIMIT.
Creates an instance based on a hash containing memory settings and the application ' s memory size in $MEMORY_LIMIT .
stack_bucket
buckets
java_opts a mapping from a memory type to a +JAVA_OPTS+ option
java_opts a mapping from a memory type to a + JAVA_OPTS + option