# HG changeset patch # User Tatsuki IHA # Date 1436797332 -32400 # Node ID 89d76048618874d52699b7a1b6b936e77acfd003 # Parent 2a40d697bf4e80c54c3bd28542374e6032e6835a Add allocater to synchronizedQueue diff -r 2a40d697bf4e -r 89d760486188 src/synchronizedQueue/allocate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/synchronizedQueue/allocate.h Mon Jul 13 23:22:12 2015 +0900 @@ -0,0 +1,15 @@ +__code allocate(); +__code meta_allocate(); +extern __code meta(); + +__code allocate(struct Context* context) { + goto meta_allocate(context); +} + + + +__code meta_allocate(struct Context* context) { + context->data[++context->dataNum] = context->heap; + context->heap += context->data[0]->allocate.size; + goto (context->code[context->data[0]->allocate.next])(context); +}