# HG changeset patch # User Shohei KOKUBO # Date 1429590803 -32400 # Node ID ec4e7a81bddf3f1be11c66c3659cf707b9cac92a # Parent 1eb599acffe43afd29c93d3d457cc028cc2ffa27 modify allocate diff -r 1eb599acffe4 -r ec4e7a81bddf src/allocate/allocateContext.c --- a/src/allocate/allocateContext.c Tue Apr 21 02:28:57 2015 +0900 +++ b/src/allocate/allocateContext.c Tue Apr 21 13:33:23 2015 +0900 @@ -16,5 +16,5 @@ context->dataSize = 0; context->data[context->dataSize] = context->heap; - context->dataSize++; + context->heap += sizeof(struct Allocate); } diff -r 1eb599acffe4 -r ec4e7a81bddf src/include/allocate.h --- a/src/include/allocate.h Tue Apr 21 02:28:57 2015 +0900 +++ b/src/include/allocate.h Tue Apr 21 13:33:23 2015 +0900 @@ -7,8 +7,7 @@ } __code meta_allocate(struct Context* context) { - context->data[context->dataSize] = context->heap; - context->heap += sizeof(union Data); - context->dataSize++; - goto (context->code[context->data[context->dataSize-1]->allocate.next])(context); + context->data[++context->dataSize] = context->heap; + context->heap += context->data[0]->allocate.size; + goto (context->code[context->data[0]->allocate.next])(context); }