User land function to get memory left to allocate

From: Date: Wed, 31 Jul 2024 12:07:11 +0000
Subject: User land function to get memory left to allocate
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-124698@lists.php.net to get a copy of this message
Hey folks, in this PR[1] it got mentioned that it could be beneficial to add a userland function that tells you how much memory there is still available for you to allocate. I am writing to ask for your opinion on this, because technically it should be doable with a few lines of user land code (see the change in the PR, at least for Linux). Nevertheless it could be nice to have such a function telling you how much memory there is left before the inevitable. I really don't know if that would be beneficial to any other case than these tests, but maybe there are some opinions here. Kind regards Florian [1] https://github.com/php/php-src/pull/14895

« previous php.internals (#124698) next »