libobs: Use os_oom() for out of memory crash

This change will make the crash stack clearer when OBS is crashing due
to "out of memory" rather than an explicit bmalloc/brealloc(0) call.
This commit is contained in:
Ryan Foster
2025-08-18 15:51:53 -04:00
parent 94a736f179
commit 01e7b78929
+2 -2
View File
@@ -108,7 +108,7 @@ void *bmalloc(size_t size)
void *ptr = a_malloc(size);
if (!ptr) {
os_breakpoint();
os_oom();
bcrash("Out of memory while trying to allocate %lu bytes", (unsigned long)size);
}
@@ -129,7 +129,7 @@ void *brealloc(void *ptr, size_t size)
ptr = a_realloc(ptr, size);
if (!ptr) {
os_breakpoint();
os_oom();
bcrash("Out of memory while trying to allocate %lu bytes", (unsigned long)size);
}