Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector is already in core, but we are not using it. It can get the current PHP memory_limit setting and convert it into a byte count.
The attached patch updates drupal_check_memory_limit() to use MemoryDataCollector and also simplifies everything.
Attachment | Size | Status | Test result | Operations |
---|---|---|---|---|
use-MemoryDataCollector.patch | 8.98 KB | Idle | PASSED: [[SimpleTest]]: [MySQL] 57,443 pass(es). | View details | Re-test |