Changeset 559
- Timestamp:
- Apr 30, 2011, 12:24:51 AM (11 years ago)
- Location:
- abuse/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/lisp/lisp.cpp
r558 r559 2467 2467 } 2468 2468 case SYS_FUNC_RESIZE_TMP: 2469 resize_tmp(lnumber_value(CAR(arg_list)->Eval()));2469 // Deprecated and useless 2470 2470 break; 2471 2471 case SYS_FUNC_RESIZE_PERM: 2472 resize_perm(lnumber_value(CAR(arg_list)->Eval()));2472 // Deprecated and useless 2473 2473 break; 2474 2474 case SYS_FUNC_COS: … … 3149 3149 } 3150 3150 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 } else3162 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 3183 3151 void l_comp_init(); 3184 3152 void lisp_init(long perm_size, long tmp_size) -
abuse/trunk/src/loader2.cpp
r555 r559 362 362 compiled_init(); 363 363 clear_tmp(); 364 resize_tmp(0x4000);365 364 366 365 dprintf("Engine : Registering base graphics\n");
Note: See TracChangeset
for help on using the changeset viewer.