diff --git a/Android.mk b/Android.mk
index a5249a16ed03f4ac20eabfc1e2cf86af7ab00d12..83ec9f6c72658fc2a589a821e488e9450dee6fe9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -61,3 +61,25 @@ $(foreach file,$(GAIA_DISTRIBUTION_SRC_FILES),\
   $(eval $(call mk_gaia_distribution_file, $(file), $(GAIA_DISTRIBUTION_DIR)/$(notdir $(file)))))
 
 endif
+
+
+ifeq ($(TARGET_USES_265MB_CONFIG), true)
+
+# Gecko low-memory killer setting overrides
+#
+# It would be nice to use PRODUCT_COPY_FILES here instead but that is not
+# currently possible due to various |rm -rf ...| commands in
+# {gaia,gonk-misc}/Android.mk that Make does not know about.
+#
+$(TARGET_OUT)/gecko: gaia/profile/defaults/pref/lmk.js
+.PHONY: gaia/profile/defaults/pref/lmk.js
+gaia/profile/defaults/pref/lmk.js: gaia/profile.tar.gz
+	mkdir -p $(@D)
+	echo '// Give background applications more headroom' > $@
+	echo 'pref("hal.processPriorityManager.gonk.BACKGROUND.KillUnderKB", 14336);' >> $@
+	echo '// Notify low memory between BACKGROUND and BACKGROUND_HOMESCREEN' >> $@
+	echo 'pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 12288);' >> $@
+	echo '// Kill the preallocated process before any foreground app (FOREGROUND_KEYBOARD)' >> $@
+	echo 'pref("hal.processPriorityManager.gonk.PREALLOC.OomScoreAdjust", 300);' >> $@
+
+endif