took a break and started to figure out worker codenames for fun
This commit is contained in:
0
code/grime/arena_fixed.odin
Normal file
0
code/grime/arena_fixed.odin
Normal file
0
code/grime/arena_vchaining.odin
Normal file
0
code/grime/arena_vchaining.odin
Normal file
@ -47,7 +47,7 @@ DLL_NodePN :: struct ( $ Type : typeid ) {
|
||||
prev, next : ^Type,
|
||||
}
|
||||
DLL_NodeFL :: struct ( $ Type : typeid ) {
|
||||
first, last : ^Type,
|
||||
first, last : ^Type,
|
||||
}
|
||||
DLL_NodeBT :: struct ($Type: typeid) {
|
||||
bottom, top: ^Type,
|
||||
|
0
code/grime/pool_virtual.odin
Normal file
0
code/grime/pool_virtual.odin
Normal file
@ -1,5 +1,9 @@
|
||||
package grime
|
||||
|
||||
/*
|
||||
This is just a snippet file, do not use directly.
|
||||
*/
|
||||
|
||||
import "base:runtime"
|
||||
import "core:prof/spall"
|
||||
|
||||
@ -8,26 +12,30 @@ SpallProfiler :: struct {
|
||||
buffer : spall.Buffer,
|
||||
}
|
||||
|
||||
@(private)
|
||||
Module_Context : ^SpallProfiler
|
||||
// The rest is a snippet to implement in the target codebase.
|
||||
when false
|
||||
{
|
||||
@(private)
|
||||
Module_Context : ^SpallProfiler
|
||||
|
||||
set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
|
||||
Module_Context = ctx
|
||||
}
|
||||
set_profiler_module_context :: #force_inline proc "contextless" ( ctx : ^SpallProfiler ) {
|
||||
Module_Context = ctx
|
||||
}
|
||||
|
||||
DISABLE_PROFILING :: true
|
||||
DISABLE_PROFILING :: true
|
||||
|
||||
@(deferred_none = profile_end, disabled = DISABLE_PROFILING)
|
||||
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
@(deferred_none = profile_end, disabled = DISABLE_PROFILING)
|
||||
profile :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_begin :: #force_inline proc "contextless" ( name : string, loc := #caller_location ) {
|
||||
spall._buffer_begin( & Module_Context.ctx, & Module_Context.buffer, name, "", loc )
|
||||
}
|
||||
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_end :: #force_inline proc "contextless" () {
|
||||
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
|
||||
}
|
||||
@(disabled = DISABLE_PROFILING)
|
||||
profile_end :: #force_inline proc "contextless" () {
|
||||
spall._buffer_end( & Module_Context.ctx, & Module_Context.buffer)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user