adding bounded arena allocator to renderer
Build / build (push) Successful in 1m6s
Test / build_and_test (push) Failing after 8h9m28s

This commit is contained in:
2026-05-10 12:28:53 +02:00
parent 7f812bcf39
commit e9454ddd9a
9 changed files with 107 additions and 32 deletions
+21
View File
@@ -0,0 +1,21 @@
//! Atomic based spin mutex
const std = @import("std");
mutex: std.atomic.Mutex = .unlocked,
pub fn lock(self: *@This()) void {
if (self.mutex.tryLock()) {
@branchHint(.likely);
return;
}
while (true) {
if (self.mutex.tryLock()) {
return;
}
}
}
pub fn unlock(self: *@This()) void {
self.mutex.unlock();
}