diff --git a/cobalt/site/docs/reference/starboard/gn-configuration.md b/cobalt/site/docs/reference/starboard/gn-configuration.md
index b139d8036a23..7a480b472800 100644
--- a/cobalt/site/docs/reference/starboard/gn-configuration.md
+++ b/cobalt/site/docs/reference/starboard/gn-configuration.md
@@ -5,7 +5,6 @@ Book: /youtube/cobalt/_book.yaml
| Variables |
| :--- |
-| **`abort_on_allocation_failure`**
Halt execution on failure to allocate memory.
The default value is `true`. |
| **`asan_symbolizer_path`**
A symbolizer path for ASAN can be added to allow translation of callstacks.
The default value is `"/bin/llvm-symbolizer"`. |
| **`cobalt_licenses_platform`**
Sub-directory to copy license file to.
The default value is `"default"`. |
| **`cobalt_platform_dependencies`**
List of platform-specific targets that get compiled into cobalt.
The default value is `[]`. |
diff --git a/starboard/build/config/BUILD.gn b/starboard/build/config/BUILD.gn
index 9defee0080de..019ba036d606 100644
--- a/starboard/build/config/BUILD.gn
+++ b/starboard/build/config/BUILD.gn
@@ -141,10 +141,6 @@ config("starboard") {
]
}
- if (abort_on_allocation_failure) {
- defines += [ "SB_ABORT_ON_ALLOCATION_FAILURE" ]
- }
-
if (is_internal_build) {
defines += [ "INTERNAL_BUILD" ]
}
diff --git a/starboard/build/config/base_configuration.gni b/starboard/build/config/base_configuration.gni
index 713606314c28..8917fa5323db 100644
--- a/starboard/build/config/base_configuration.gni
+++ b/starboard/build/config/base_configuration.gni
@@ -71,9 +71,6 @@ declare_args() {
starboard_level_gtest_target_type = "executable"
starboard_level_final_executable_type = "executable"
- # Halt execution on failure to allocate memory.
- abort_on_allocation_failure = true
-
# The source of EGL and GLES headers and libraries.
# Valid values (case and everything sensitive!):
# "none" - No EGL + GLES implementation is available on this platform.
diff --git a/starboard/shared/starboard/memory.cc b/starboard/shared/starboard/memory.cc
index 455201edbe7a..d27f9eb5b7c2 100644
--- a/starboard/shared/starboard/memory.cc
+++ b/starboard/shared/starboard/memory.cc
@@ -102,27 +102,15 @@ void* SbMemoryAllocateChecked(size_t size) {
namespace {
inline void* SbMemoryAllocateImpl(size_t size) {
-#if SB_ABORT_ON_ALLOCATION_FAILURE
return SbMemoryAllocateChecked(size);
-#else
- return SbMemoryAllocateUnchecked(size);
-#endif
}
inline void* SbMemoryAllocateAlignedImpl(size_t alignment, size_t size) {
-#if SB_ABORT_ON_ALLOCATION_FAILURE
return SbMemoryAllocateAlignedChecked(alignment, size);
-#else
- return SbMemoryAllocateAlignedUnchecked(alignment, size);
-#endif
}
inline void* SbMemoryReallocateImpl(void* memory, size_t size) {
-#if SB_ABORT_ON_ALLOCATION_FAILURE
return SbMemoryReallocateChecked(memory, size);
-#else
- return SbMemoryReallocateUnchecked(memory, size);
-#endif
}
} // namespace