Mercurial > hg > Papers > 2018 > suruga-thesis
view paper/final_main/src/context.h @ 45:0da3636c105b default tip
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Feb 2018 12:10:56 +0900 |
parents | 0f938112b48e |
children |
line wrap: on
line source
/* Context definition */ #define ALLOCATE_SIZE 1024 enum Code { Code1, Code2, Allocator, }; enum UniqueData { Allocate, Tree, }; struct Context { int codeNum; __code (**code) (struct Context *); void* heap_start; void* heap; long dataSize; int dataNum; union Data **data; }; union Data { struct Tree { union Data* root; union Data* current; union Data* prev; int result; } tree; struct Node { int key; int value; enum Color { Red, Black, } color; union Data* left; union Data* right; } node; struct Allocate { long size; enum Code next; } allocate; };