comparison paper/source/allocate.h @ 8:bb5fab31cf41

add source file
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Tue, 05 May 2015 17:49:31 +0900
parents
children 92f7c78d8d6c
comparison
equal deleted inserted replaced
7:9d4f48d9a22d 8:bb5fab31cf41
1 __code code1(struct Context* context) {
2 context->data[Allocate]->allocate.size = sizeof(struct Node);
3 context->data[Allocate]->allocate.next = Code2;
4 goto Allocate(context);
5 }
6
7 __code allocate(struct Context* context) {
8 context->data[++context->dataNum] = context->heap;
9 context->heap += context->data[Allocate]->allocate.size;
10 goto (context->code[context->data[Allocate]->allocate.next])(context);
11 }
12
13 __code code2(struct Context* context) {
14 // processing content
15 }