configurable stack size

This commit is contained in:
Yuichi Nishiwaki 2013-10-15 23:28:23 +09:00
parent 47971c1289
commit ea6230e90c
2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@
#define PIC_ARENA_SIZE 100 #define PIC_ARENA_SIZE 100
#define PIC_HEAP_SIZE 8192 #define PIC_HEAP_SIZE 8192
#define PIC_STACK_SIZE 1024
#define DEBUG 1 #define DEBUG 1

View File

@ -26,8 +26,8 @@ pic_open()
pic = (pic_state *)malloc(sizeof(pic_state)); pic = (pic_state *)malloc(sizeof(pic_state));
/* prepare VM stack */ /* prepare VM stack */
pic->stbase = pic->sp = (pic_value *)malloc(sizeof(pic_value) * 1024); pic->stbase = pic->sp = (pic_value *)malloc(sizeof(pic_value) * PIC_STACK_SIZE);
pic->stend = pic->stbase + 1024; pic->stend = pic->stbase + PIC_STACK_SIZE;
/* memory heap */ /* memory heap */
pic->heap = (struct heap_page *)malloc(sizeof(struct heap_page)); pic->heap = (struct heap_page *)malloc(sizeof(struct heap_page));