mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-29 02:03:03 +08:00
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:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user