瀏覽代碼

Comment out allocator guards for the time being

gingerBill 2 年之前
父節點
當前提交
9428f792ed
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 5 2
      src/common_memory.cpp
  2. 1 1
      src/main.cpp

+ 5 - 2
src/common_memory.cpp

@@ -359,8 +359,11 @@ gb_internal gbAllocator temporary_allocator() {
 	return arena_allocator(&temporary_arena);
 }
 
-#define TEMPORARY_ALLOCATOR_GUARD() ArenaTempGuard GB_DEFER_3(_arena_guard_){&temporary_arena}
-#define PERMANENT_ALLOCATOR_GUARD() ArenaTempGuard GB_DEFER_3(_arena_guard_){&permanent_arena}
+#define TEMPORARY_ALLOCATOR_GUARD()
+#define PERMANENT_ALLOCATOR_GUARD()
+
+// #define TEMPORARY_ALLOCATOR_GUARD() ArenaTempGuard GB_DEFER_3(_arena_guard_){&temporary_arena}
+// #define PERMANENT_ALLOCATOR_GUARD() ArenaTempGuard GB_DEFER_3(_arena_guard_){&permanent_arena}
 
 
 

+ 1 - 1
src/main.cpp

@@ -16,7 +16,7 @@
 gb_global ThreadPool global_thread_pool;
 gb_internal void init_global_thread_pool(void) {
 	isize thread_count = gb_max(build_context.thread_count, 1);
-	isize worker_count = thread_count-1;
+	isize worker_count = thread_count; // +1
 	thread_pool_init(&global_thread_pool, permanent_allocator(), worker_count, "ThreadPoolWorker");
 }
 gb_internal bool thread_pool_add_task(WorkerTaskProc *proc, void *data) {