**********************************************************/
void
-_ecl_set_max_heap_size(cl_index new_size)
+_ecl_set_max_heap_size(size_t new_size)
{
const cl_env_ptr the_env = ecl_process_env();
ecl_disable_interrupts_env(the_env);
si_set_limit(cl_object type, cl_object limit)
{
cl_env_ptr env = ecl_process_env();
- cl_index the_size = ecl_to_size(limit);
cl_index margin;
if (type == @'ext::frame-stack') {
+ cl_index the_size = ecl_to_size(limit);
margin = ecl_option_values[ECL_OPT_FRAME_STACK_SAFETY_AREA];
frs_set_size(env, the_size + 2*margin);
} else if (type == @'ext::binding-stack') {
+ cl_index the_size = ecl_to_size(limit);
margin = ecl_option_values[ECL_OPT_BIND_STACK_SAFETY_AREA];
ecl_bds_set_size(env, the_size + 2*margin);
} else if (type == @'ext::c-stack') {
+ cl_index the_size = ecl_to_size(limit);
margin = ecl_option_values[ECL_OPT_C_STACK_SAFETY_AREA];
cs_set_size(env, the_size + 2*margin);
- } else if (type == @'ext::lisp-stack')
+ } else if (type == @'ext::lisp-stack') {
+ cl_index the_size = ecl_to_size(limit);
ecl_stack_set_size(env, the_size);
- else
+ } else {
+ size_t the_size = (size_t)ecl_to_ulong(limit);
_ecl_set_max_heap_size(fix_heap_size(the_size));
+ }
return si_get_limit(type);
}
#ifdef GBC_BOEHM
#define ECL_COMPACT_OBJECT_EXTRA(x) ((void*)((x)->array.displaced))
#endif
-extern void _ecl_set_max_heap_size(cl_index new_size);
+extern void _ecl_set_max_heap_size(size_t new_size);
extern cl_object ecl_alloc_bytecodes(cl_index data_size, cl_index code_size);
extern cl_index ecl_object_byte_size(cl_type t);