2019-06-01 23:58:28 +00:00
|
|
|
/*
|
|
|
|
* 4coder app links base allocator
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
Scratch_Block::Scratch_Block(Application_Links *app, Scratch_Share_Code share){
|
|
|
|
scratch_block__init(this, get_thread_context(app), share);
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Scratch_Block::Scratch_Block(Application_Links *app){
|
2019-10-01 02:06:21 +00:00
|
|
|
scratch_block__init(this, get_thread_context(app), share_code_default);
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
////////////////////////////////
|
2019-06-01 23:58:28 +00:00
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
internal Arena*
|
|
|
|
reserve_arena(Application_Links *app, umem chunk_size, umem align){
|
|
|
|
Thread_Context *tctx = get_thread_context(app);
|
|
|
|
return(reserve_arena(tctx, chunk_size, align));
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
internal Arena*
|
|
|
|
reserve_arena(Application_Links *app, umem chunk_size){
|
|
|
|
Thread_Context *tctx = get_thread_context(app);
|
|
|
|
return(reserve_arena(tctx, chunk_size));
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
internal Arena*
|
|
|
|
reserve_arena(Application_Links *app){
|
|
|
|
Thread_Context *tctx = get_thread_context(app);
|
|
|
|
return(reserve_arena(tctx));
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
2019-10-01 02:06:21 +00:00
|
|
|
internal void
|
|
|
|
release_arena(Application_Links *app, Arena *arena){
|
|
|
|
Thread_Context *tctx = get_thread_context(app);
|
|
|
|
release_arena(tctx, arena);
|
2019-06-01 23:58:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|