check_estack_size Function (ROM Call 0x2C2)

AMS 1.01 or higher estack.h

void check_estack_size (unsigned short Size);

Checks if there is enough room on the expression stack.

check_estack_size checks if there is enough room to push Size bytes to the expression stack. If there is not enough space, it tries to enlarge the stack (using HeapRealloc) to make additional space. It throws an error if the requirement cannot be satisfied. Note that all "push_..." functions call this routine, so all of them may throw an error if there is not enough memory.


Uses: top_estack, HeapRealloc, estack_max_index
Used by: compare_complex_magnitudes, index_below_display_expression_aux, Parse2DExpr, Parse2DMultiExpr, push_between, push_Float, push_Float_to_nonneg_int, push_offset_array, push_parse_text, push_quantum, push_quantum_pair, cmd_newdata, did_push_anti_deriv, did_push_series, push_1st_derivative, push_abs, push_comb, push_comdenom, push_csolve, push_czeros, push_def_int, push_denominator, push_desolve, push_expand, push_extended_prod, push_factor, push_floor, push_fractional_part, push_gcd_numbers, push_im, push_integer_lcm, push_integer_quotient, push_is_prime, push_lim, push_max, push_median, push_min, push_mod, push_nsolve, push_nth_derivative, push_numerator, push_phase, push_re, push_rotate, push_sequence, push_shift, push_sin2, push_solve, push_string, push_summation, push_tan, push_zeros, did_push_to_polar, push_and, push_equals, push_exponentiate, push_greater_than, push_greater_than_or_equals, push_less_than, push_less_than_or_equals, push_negate, push_not, push_not_equals, push_or, push_product, push_sum, push_to_cylin, push_to_sphere, add_to_top, are_units_consistent, compare_numbers, does_push_fetch, EQU_getNameInfo, get_list_indices, get_matrix_indices, get_ub, GraphOrTableCmd, index_if_pushed_qquad_info, push_auto_units_conversion, push_but_factor, push_but_term, push_constant_factors, push_constant_terms, push_dependent_factors, push_dependent_terms, push_div_dif_1c, push_float_qr_fact, push_gcd_then_cofactors, push_independent_factors, push_independent_terms, push_lu_fact, push_make_proper, push_nonconstant_factors, push_nonconstant_terms, push_nonnumeric_factors, push_parse_prgm_or_func_text, push_poly_qr, push_reciprocal, push_standardize, push_symbolic_qr_fact, raise_to_top, replace_top_with_post_simplified, replace_top2_with_pow, replace_top2_with_prod, replace_top2_with_sum, times_top, ROM Call 0x4EC, ROM Call 0x4ED, ROM Call 0x4F2