Browse Source

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.
Ryan Foster 2 months ago
parent
commit
01e7b78929
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libobs/util/bmem.c

+ 2 - 2
libobs/util/bmem.c

@@ -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);
 	}