Mercurial > hg > Members > Moririn
comparison src/parallel_execution/allocate.c @ 148:473b7d990a1f
fix data gears type enum
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 10 Nov 2016 12:07:53 +0900 |
parents | a747dc9d4da6 |
children | c34e6aa10967 |
comparison
equal
deleted
inserted
replaced
147:f2275f5777f4 | 148:473b7d990a1f |
---|---|
1 #include "context.h" | 1 #include "context.h" |
2 #include "origin_cs.h" | 2 #include "origin_cs.h" |
3 | 3 |
4 union Data* allocator(struct Context* context) { | 4 union Data* allocator(struct Context* context) { |
5 context->data[++context->dataNum] = context->heap; | 5 context->data[++context->dataNum] = context->heap; |
6 context->heap += context->data[Allocate]->allocate.size; | 6 context->heap += context->data[D_Allocate]->allocate.size; |
7 return context->data[context->dataNum]; | 7 return context->data[context->dataNum]; |
8 } | 8 } |
9 | 9 |
10 __code allocatorCS(struct Context* context, struct Allocate* allocate) { | 10 __code allocatorCS(struct Context* context, struct Allocate* allocate) { |
11 context->data[++context->dataNum] = context->heap; | 11 context->data[++context->dataNum] = context->heap; |
12 context->heap += allocate->size; | 12 context->heap += allocate->size; |
13 goto meta(context, allocate->next); | 13 goto meta(context, allocate->next); |
14 } | 14 } |
15 | 15 |
16 __code allocator_stub(struct Context* context) { | 16 __code allocator_stub(struct Context* context) { |
17 goto allocatorCS(context, &context->data[Allocate]->allocate); | 17 goto allocatorCS(context, &context->data[D_Allocate]->allocate); |
18 } | 18 } |