System.setMaxMemoryMb
System.setMaxMemoryMb($maxMemoryMb) -> null
Description
Set the maximum amount of memory in MB that the current page can use before triggering a memory limit error.
The value must be greater than zero.
This overrides the app-level config maxMemoryMb setting.
SecurityThis should be only be used to extend individual scripts that require a larger amounts of memory for authenticated users (e.g. running reports). Otherwise, you risk exposing your app to DDoS attacks.
System.setMaxMemoryMb(30)