简体   繁体   English

Symfony任务意外的内存

[英]Symfony Task Unexpected Memory

I am using Symfony task php5.2. 我正在使用Symfony任务php5.2。 Here is a portion of my code: 这是我的代码的一部分:

array of images 图像阵列

foreach($array as $k=>$v)
{
    abc(); // function call which will cope images from one server to another
           // by using file_get_content in a php variable and using api(wso).
    echo memory_get_usage();
}

problem is memory_get_usage(); 问题是memory_get_usage(); always returning same value but when i am using top command memory is increasing nonstop. 总是返回相同的值,但是当我使用顶部命令时,内存会不断增加。

Is there any bug in symfony task or php5.2 or wso. symfony任务或php5.2或wso中是否有任何错误。

Have you tried memory_get_usage(true) ? 您是否尝试过memory_get_usage(true)

Also, have you considered that it might not be PHP that is using the memory? 另外,您是否考虑过使用内存的可能不是PHP? But some other library you are using? 但是您正在使用其他库吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM