view src/allocate.h @ 7:ad48a076a8e5

fix
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Tue, 24 Mar 2015 17:55:43 +0900
parents cd262e34ac1a
children
line wrap: on
line source

typedef struct DataSegment1 {
    int i;      // 4 byte
    char c[10]; // 10 byte
                // padding 2 byte
} data1;

typedef struct DataSegment2 {
    int x; // 4 byte
    int y; // 4 byte
    int z; // 4 byte
} data2;

typedef struct metaDataSegment {
    size_t size; // 8 byte
    void* ds;    // 8 byte
} mdata;

typedef struct Context_st {
    void* ds;
    void* mds;
    void* ds_heap;
    void* mds_heap;
    __code (*continuer)();
} Context;

__code start_code();
__code meta_start_code();
__code code1();
__code meta_code1();
__code allocate();
__code meta_allocate();
__code code2(Context*, data1*, int);
__code meta_code2();
__code exit_code();