remembered to free arenas
This commit is contained in:
parent
133a1b294d
commit
281bf66ef6
2
build.sh
2
build.sh
@ -8,7 +8,7 @@ if [ -v debug ]; then echo "[debug mode]"; fi
|
||||
if [ -v release ]; then echo "[release mode]"; fi
|
||||
if [ -v gcc ]; then compiler="${CC:-gcc}"; cpp_compiler="g++"; echo "[gcc compiler]"; fi
|
||||
if [ -v clang ]; then compiler="${CC:-clang}"; cpp_compiler="clang++"; echo "[clang compiler]"; fi
|
||||
if [ ! -v vulkan ] then vulkan=1; fi
|
||||
if [ ! -v vulkan ]; then vulkan=1; fi
|
||||
if [ -v vulkan ]; then render_flag="-DSTG_VULKAN_RENDERER"; fi
|
||||
if [ -v vulkan ]; then render_link="-lvulkan -l:libvma.a"; echo "[vulkan renderer]"; fi
|
||||
if [ ! -v render_flag ]; then render_flag="-DSTG_VULKAN_RENDERER"; vulkan="vulkan"; echo "[default renderer - vulkan]"; fi
|
||||
|
||||
@ -53,6 +53,8 @@ static void gFrameStartNew()
|
||||
|
||||
static void gRunCycle(gGameCtx *ctx, pGameInput *inputs, u32 i_count)
|
||||
{
|
||||
ArenaFree(vFrameArena());
|
||||
|
||||
rBufferQueueReset();
|
||||
|
||||
gPrepareGUICtx(ctx);
|
||||
|
||||
@ -298,11 +298,12 @@ b32 pSyscallErrCheck(void *ptr)
|
||||
|
||||
// ::Platform::Linux::Async::Start::
|
||||
|
||||
static pThread pThreadInit(pThreadProc proc, rawptr param)
|
||||
static pThread pThreadInit(rawptr proc, rawptr param)
|
||||
{
|
||||
pThread thread = {0};
|
||||
pthread_mutex_init(&thread.mut, NULL);
|
||||
pthread_create(&thread.handle, NULL, proc, param);
|
||||
Assert(pthread_mutex_init(&thread.mut, NULL) == 0, "pthread_mutex_init failure");
|
||||
Assert(pthread_cond_init(&thread.cond, NULL) == 0, "pthread_cond_init failure");
|
||||
Assert(pthread_create(&thread.handle, NULL, proc, param) == 0, "pthread_create failure");
|
||||
|
||||
return thread;
|
||||
}
|
||||
|
||||
@ -1819,6 +1819,7 @@ static void vTransferUpload(vTransfer **transfers, u32 count)
|
||||
void *vLoaderStart(void *i)
|
||||
{
|
||||
vLoader();
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
#elif _WIN32
|
||||
@ -1838,7 +1839,7 @@ static void vLoaderWake()
|
||||
|
||||
static void vLoader()
|
||||
{
|
||||
pThread self = v_Renderer.async.thread;
|
||||
pThread *self = &v_Renderer.async.thread;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -1873,7 +1874,7 @@ static void vLoader()
|
||||
{
|
||||
pAtomicStoreB32(&v_Renderer.async.sleeping, 1);
|
||||
TicketMutUnlock(&v_Renderer.upload.mut);
|
||||
pThreadSuspend(&self);
|
||||
pThreadSuspend(self);
|
||||
pAtomicStoreB32(&v_Renderer.async.sleeping, 0);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user