Changeset 559


Ignore:
Timestamp:
Apr 30, 2011, 12:24:51 AM (7 years ago)
Author:
Sam Hocevar
Message:

lisp: remove space resizing methods, they're useless now that automatic
grow works.

Location:
abuse/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp.cpp

    r558 r559  
    24672467    }
    24682468    case SYS_FUNC_RESIZE_TMP:
    2469         resize_tmp(lnumber_value(CAR(arg_list)->Eval()));
     2469        // Deprecated and useless
    24702470        break;
    24712471    case SYS_FUNC_RESIZE_PERM:
    2472         resize_perm(lnumber_value(CAR(arg_list)->Eval()));
     2472        // Deprecated and useless
    24732473        break;
    24742474    case SYS_FUNC_COS:
     
    31493149}
    31503150
    3151 void resize_perm(size_t new_size)
    3152 {
    3153   if (new_size<((char *)free_space[PERM_SPACE]-(char *)space[PERM_SPACE]))
    3154   {
    3155     lbreak("resize perm : %d is to small to hold current heap\n", new_size);
    3156     exit(0);
    3157   } else if (new_size>space_size[PERM_SPACE])
    3158   {
    3159     lbreak("Only smaller resizes allowed for now.\n");
    3160     exit(0);
    3161   } else
    3162     dprintf("doesn't work yet!\n");
    3163 }
    3164 
    3165 void resize_tmp(size_t new_size)
    3166 {
    3167   if (new_size<((char *)free_space[TMP_SPACE]-(char *)space[TMP_SPACE]))
    3168   {
    3169     lbreak("resize perm : %d is to small to hold current heap\n", new_size);
    3170     exit(0);
    3171   } else if (new_size>space_size[TMP_SPACE])
    3172   {
    3173     printf("Only smaller resizes allowed for now.\n");
    3174     exit(0);
    3175   } else if (free_space[TMP_SPACE]==space[TMP_SPACE])
    3176   {
    3177     free_space[TMP_SPACE] = space[TMP_SPACE] = (uint8_t *)realloc(space[TMP_SPACE], new_size);
    3178     space_size[TMP_SPACE] = new_size;
    3179     dprintf("Lisp : tmp space resized to %d\n", new_size);
    3180   } else dprintf("Lisp :tmp not empty, cannot resize\n");
    3181 }
    3182 
    31833151void l_comp_init();
    31843152void lisp_init(long perm_size, long tmp_size)
  • abuse/trunk/src/loader2.cpp

    r555 r559  
    362362  compiled_init();
    363363  clear_tmp();
    364   resize_tmp(0x4000);
    365364
    366365  dprintf("Engine : Registering base graphics\n");
Note: See TracChangeset for help on using the changeset viewer.