lowmemorykiller: Adapted code