aboutsummaryrefslogtreecommitdiffstats
path: root/build/4coder_byp/custom/4coder_app_links_allocator.cpp
blob: ca885a2707880ca132d9a943102195312edd7ead (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * 4coder app links base allocator
 */

// TOP

Scratch_Block::Scratch_Block(Application_Links *app){
  Thread_Context *t = this->tctx = get_thread_context(app);
  this->arena = tctx_reserve(t);
  this->temp = begin_temp(this->arena);
}

Scratch_Block::Scratch_Block(Application_Links *app, Arena *a1){
  Thread_Context *t = this->tctx = get_thread_context(app);
  this->arena = tctx_reserve(t, a1);
  this->temp = begin_temp(this->arena);
}

Scratch_Block::Scratch_Block(Application_Links *app, Arena *a1, Arena *a2){
  Thread_Context *t = this->tctx = get_thread_context(app);
  this->arena = tctx_reserve(t, a1, a2);
  this->temp = begin_temp(this->arena);
}

Scratch_Block::Scratch_Block(Application_Links *app, Arena *a1, Arena *a2, Arena *a3){
  Thread_Context *t = this->tctx = get_thread_context(app);
  this->arena = tctx_reserve(t, a1, a2, a3);
  this->temp = begin_temp(this->arena);
}

// BOTTOM