Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124698 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 091BA1A00B7 for ; Wed, 31 Jul 2024 12:07:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722427743; bh=IISt2Ww127zJ5VYmvc94OxWnaxPVuQBUVJN5BOHkFiY=; h=References:In-Reply-To:From:Date:Subject:To:From; b=D0lpxLYqctkH+ZjuASYm1P3l8XSq3luakVf88zCYMQRSI/KxpBIjsj7VNYfXKooQ1 ktueY6PYqNxOTd5kSqCJpeffz6e9RgKzXb77vrfbUruB2qWdGehZX96GTO/QyNsFGK Y9RMHvBavnOUkt38kMDPpQahPrlrf7ZThT2QoF7tIIdYnCdBbL49bTplC9vb1FqUID SN5n4KA0z+AKH6GOqEurSEYn4HzPK8NsWn5fFjdzRxLy8uyARTjoTvtHfpQC+KKxDx rHHKXf3SXQGeikfbLja9bTjVwB4QNX1OBBIbsH6y61EloPh/9pb5o9CdFHCbHG1RP4 oDhLcSteNjhfA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21370180042 for ; Wed, 31 Jul 2024 12:09:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from smtp02-ext3.udag.de (smtp02-ext3.udag.de [62.146.106.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 31 Jul 2024 12:09:02 +0000 (UTC) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by smtp02-ext3.udag.de (Postfix) with ESMTPA id 60637E0193 for ; Wed, 31 Jul 2024 14:07:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=engelhardt.tc; s=uddkim-202310; t=1722427642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IISt2Ww127zJ5VYmvc94OxWnaxPVuQBUVJN5BOHkFiY=; b=UM9LKmYHmomnExJr7zHPyIJhYoA1ae5OsNyC3Se2KZfcPGX7FR4ezQouqZxgWq0UcEjhaP zfUbRkdN5GgSRcFZxfxRGcd7OtloroH5WUda417feZgQwBfWBuzAPefMWT71tFw7NZ+Lat SKSKc5lz1HCHo9TRLyQcjXGoWP4vciCCfmznHZ+IpQohaWN2GwT/MFIFgbsXedy4k9jXYx waRP/5GrXCCJ0O3tjfsz/Ce74GMo3fVMRDpqe8VA/QNaeF8puaqYAXpT95xBIN/tmPQ2Zl 7YaGBmel3T/92QHu6rti8DfxGwD4xnNm4tp74SA4ALzVm/LesPodo4dLkvAqYQ== Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-428178fc07eso33654585e9.3 for ; Wed, 31 Jul 2024 05:07:22 -0700 (PDT) X-Gm-Message-State: AOJu0YwXugeuDcjWEWY8LJwX6nO03sQ10re+h4afwQKXS2t7uExxyIT5 EsjBnEjbhFNM3j9PfUa3YaWjPI95ke/cACdnXrXRd8Yuv/uCy62GOOwOpzGaNpLNVs3l3KdAvc5 0L6peO6MqNLDvFfOR+T4xxY3uO1Y= X-Google-Smtp-Source: AGHT+IGCsJnPnFs//v0UQmXgS3dLgUIWc/vn+ld4THFDAbXaqrt+XGbcO/qmhwfohq3k/agRzu5p2NrQLI3trFIymr4= X-Received: by 2002:a05:6000:1f8f:b0:368:5e34:4b4b with SMTP id ffacd0b85a97d-36b5cee2f35mr10834719f8f.6.1722427641961; Wed, 31 Jul 2024 05:07:21 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 31 Jul 2024 14:07:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: [PHP-DEV] User land function to get memory left to allocate To: PHP internals Content-Type: multipart/alternative; boundary="000000000000c02dd5061e89eff1" Authentication-Results: smtp02-ext3.udag.de; auth=pass smtp.auth=florian@engelhardt.tc smtp.mailfrom=florian@engelhardt.tc From: florian@engelhardt.tc (Florian Engelhardt) --000000000000c02dd5061e89eff1 Content-Type: text/plain; charset="UTF-8" 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 --000000000000c02dd5061e89eff1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey folks,
in this PR[1] it got=C2=A0mentioned that it could be benefi= cial to add a userland function that tells you how much memory there is sti= ll available for you to allocate.
I am writing to ask for your op= inion 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=C2=A0inevitable.
I really don't know if t= hat would be beneficial to any other case than these tests, but maybe there= are some opinions here.

Kind regards
Fl= orian

--000000000000c02dd5061e89eff1--