core/heap.c
/* checks for compatibility among heap options, returns true if
 * modified the value of any options to make them compatible 
 */
checks for compatibility among heap options, returns true if
modified the value of any options to make them compatible
checks for compatibility among heap options returns true if modified the value of any options to make them compatible
bool
heap_check_option_compatibility()
{
    bool ret = false;
    ret = check_param_bounds(&dynamo_options.vm_size, MIN_VMM_HEAP_UNIT_SIZE,
                             MAX_VMM_HEAP_UNIT_SIZE, "vm_size")
        || ret;
#ifdef INTERNAL
    ret = check_param_bounds(&dynamo_options.initial_heap_unit_size,
                             ALIGN_FORWARD(UNITOVERHEAD + 1, PAGE_SIZE),
                             HEAP_UNIT_MAX_SIZE, "initial_heap_unit_size")
        || ret;
    ret = check_param_bounds(&dynamo_options.initial_global_heap_unit_size,
                             ALIGN_FORWARD(UNITOVERHEAD + 1, PAGE_SIZE),
                             HEAP_UNIT_MAX_SIZE, "initial_global_heap_unit_size")
        || ret;
    ret = check_param_bounds(&dynamo_options.max_heap_unit_size,
                             MAX(HEAP_UNIT_MIN_SIZE, GLOBAL_UNIT_MIN_SIZE),
                             INT_MAX, "max_heap_unit_size")
        || ret;
#endif
    return ret;
}
bool heap_check_option_compatibility ( ) { bool ret = false ; ret = check_param_bounds ( & dynamo_options . vm_size , MIN_VMM_HEAP_UNIT_SIZE , MAX_VMM_HEAP_UNIT_SIZE , " " ) || ret ; #ifdef INTERNAL ret = check_param_bounds ( & dynamo_options . initial_heap_unit_size , ALIGN_FORWARD ( UNITOVERHEAD + 1 , PAGE_SIZE ) , HEAP_UNIT_MAX_SIZE , " " ) || ret ; ret = check_param_bounds ( & dynamo_options . initial_global_heap_unit_size , ALIGN_FORWARD ( UNITOVERHEAD + 1 , PAGE_SIZE ) , HEAP_UNIT_MAX_SIZE , " " ) || ret ; ret = check_param_bounds ( & dynamo_options . max_heap_unit_size , MAX ( HEAP_UNIT_MIN_SIZE , GLOBAL_UNIT_MIN_SIZE ) , INT_MAX , " " ) || ret ; #endif return ret ; }
checks for compatibility among heap options, returns true if
 modified the value of any options to make them compatible
checks for compatibility among heap options returns true if modified the value of any options to make them compatible
/* if max_heap_unit_size is too small you may get a funny message
     * "initial_heap_unit_size must be >= 8229 and <= 4096" but in
     * release build we will take the min and then complain about
     * max_heap_unit_size and set it to the min also, so it all works
     * out w/o needing an extra check() call.
     */ /* case 7626: don't short-circuit checks, as later ones may be needed */ /* if have units smaller than a page we end up
                              * allocating 64KB chunks for "oversized" units
                              * for just about every alloc!  so round up to
                              * at least a page.
                              */