Next: , Up: Simultaneous Execution   [Index]


15.6.1 Simultaneous Execution Temporaries Allocator

Construction of the many executive objects, including the program executable representation, require one temporaries allocator definition, yet concurrent execution of one or more programs needs one allocator per execution.

The single allocator definition may act as a proxy for the execution being carried on.

The single allocator definition is to be introduced to the many executive object constructors, so that it is recorded and used. The executive assembler allows one input temporaries allocator struct x1f4_frame_type definition (just like the constructors of all executive objects that create temporaries).

See struct x1f4_frame_type.

See struct x1f4_textport_type.

See Executive Assembler.

The procedural program executable representations need to know how to command the creating and destruction of temporaries allocator scopes (if that is indeed required by the specific temporaries allocator). They may be instructed how to do so as:

    struct x1f4_a1screen_type screen;

    screen.back = lock_e4ll;
    screen.fast = push_e4ll;
    screen.lose = lock_e4ll;

    screen.data = context;

    return x1f4_pipe_shuffle(shuffle, &screen);

See x1f4_pipe_shuffle.

The allocation scope creation is commanded as:

static int
push_e4ll(void *context, const struct x1f4_function_type *function_data)
{
    return x1f4_push_e4ll(e4less, function_data);
}

where e4less is the execution specific temporaries allocator. The allocator here is assumed to be of the e4ll hierarchical resource allocation manager breed.

See Hierarchical Resource Allocation Manager.

See e4ll Temporaries Disposal Usage Example.

The allocation scope destruction is done in a similar fashion.

The application running simultaneous program execution will put a reference to the temporaries allocator belonging to the foreground execution in a place from where the functions push_e4ll and lock_e4ll can pick it up (the context points to an application object, uninterpreted by libaime and a prime candidate for recording such a reference).


Next: Simultaneous Execution Function Evaluation Result Recorded, Up: Simultaneous Execution   [Index]