问题标签 [memory-limit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - Centos 6、PHP、apache、CPanel memory_limit 不会增加
当运行某个需要大量内存的 PHP 脚本时,我收到“内存不足(已分配 137887744)(试图分配 93 个字节)...”错误。
我试过在我知道的所有地方增加这个..
php.ini,将 php.ini 复制到本地文件夹并在此处增加。ini_set() on 在脚本文件等中。
phpinfo 说内存是 512M。
有什么建议可以增加内存吗?
谢谢,马丁。
erlang - Erlang:如何限制分配给进程的内存
我要问的是是否可以限制分配给特定进程的内存(堆或堆栈),以便该进程不能超过它。可能类似于“process_flag(min_heap_size,MinHeapSize)”,但对于最大堆。
php - Allowed memory size exhausted but memory_get_peak_usage says otherwise
On my server I have the following error:
Allowed memory size of 268435456 bytes exhausted
This happens in a loop (a foreach one) and when I'm checking the memory usage in the loop with
I obtain 7254128
which is far from the 268435456
exhausted!
I checked at multiple places and the memory usage is not increasing wildly so I really don't know where the problem is!
The same script is working just fine on my local computer where I setted the memory limit to only 16M
in my php.ini
file
Here is the code causing the problem, but i think it won't be really usefull, it's from a plugin of question2answer open source plateform:
windows - 为什么 32 位操作系统的 4GB 内存不等于 64 位操作系统的 2GB?
据我了解,“32 位”等于 2 32,这意味着我可以使用 32 位操作系统定义 4GB 内存。而“64 位”是 2 64,它允许 15EB。因此,使用 64 位操作系统,我们可以在计算机中放入更多内存。
但是,我对另一点感到困惑。
我们可以看到在 32 位的情况下,我们在系统中有(比如说)4GB 的物理内存,我们将 4GB 除以 32 位整数的大小,我们可以在其中存储一些整数(称为 N)记忆。而且,在 64 位中,计算是 4GB 除以 64 位整数的大小,所以我们只能存储一半的整数。因此,对于 64 位,我们无法在相同的内存中存储尽可能多的整数。
这是否意味着微软通过在 32 位和 64 位版本的操作系统中将此内存显示为“4GB”来欺骗我们?
c++ - 代码块内存限制
如何增加 C 程序的内存限制。我正在使用代码块并尝试以下代码 -
它给了我运行时错误。我正在使用 Linux(Fedora)。有什么帮助...?
php - 有没有办法减少 php createimagefromjpeg 内存使用?
我正在建立一个网站,我应该能够上传非常大的图像(从 2MB 到 50MB)。当然我需要调整它们的大小,但是createimagefromjpeg函数会占用大量内存。某些图像的内存使用量达到 800 兆字节,但我使用的是 hostgator 的共享计划,并且那里的最大内存为 256M。我可以以某种方式减少此功能使用的内存吗?
php - 当地址字符串中存在哈希符号时,Google Maps API 超出内存限制
我正在使用 GoogleMaps API 来获取地址的经纬度,但奇怪的#
是,当字符串中存在符号时,Google Maps 会导致 PHP 内存不足......
编码:
错误:
当我去掉英镑符号时,一切正常。只是有点好奇谷歌的哈希符号有什么问题?
这是API的源代码,很短:
php - file_put_contents 和 file_get_contents 耗尽内存大小
我有一些简单的尝试从一个文件写入另一个文件。
我读取的文件大约 80M 大,php 中的内存限制为 128M,但出现错误:
所以即使我试图分配的内存实际上更小,内存也会耗尽?我可以通过增加内存限制来完成这项工作,但我想知道为什么它不适用于这个限制。
php - PHP: Out of memory error after setting memory limit to -1
I have a script in which I am fetching 725000 records at once and looping through to create array elements. Initially it says memory exhausted. Then, in my script I added-
After this, it throwing error-
Any suggestion?
php - PHP 将 Memory_limit 锁定为 256M 且无法更改
我一直在搜索,找不到与我的问题相关的任何内容。无论我更改 memory_limit = VALUE 多少次,php 信息页面都会显示 256MB。它发生在我的虚拟主机上。(这是我使用它的地方)。
我正在运行 Ubuntu 12.04,这就是我到目前为止所做的。
运行 php -i (给了我完整的列表和设置显示;)
运行 php -i | grep php.ini
我检查了服务器上的所有 php.ini,因为我的配置允许每个目录使用单独的 php.ini,而其他所有目录都有 128MB。
因为我的 php 信息页面显示了我在 php.ini 上为虚拟主机的根目录设置的所有值,所以我认为这是一个上限并且不能提高?
谢谢。