Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
nkostya 16.06.2010 10:46
Столкнулся с проблемой возростающего потребления памяти и невозможности освободить ее. По сути:@main[] ^for[i](0;100){ ^import[] } @import[][messages] ^for[j](0;16){ $messages[^ImportClassObject.import_by_part[$j]] $messages[] ^Rusage:compact[] } $result[]Класс ImportClass загружает данные с другого сайта, импортирует и возвращает импортированные данные. В переменные ничего не сохраняет, @OPTIONS = locals.
[BEFORE 1] {"used" => "4524", "free" => "252", "ever_allocated_since_compact" => "2225.3", "ever_allocated_since_start" => "8130.47"} [BEFORE load] {"used" => "4536", "free" => "240", "ever_allocated_since_compact" => "2260.33", "ever_allocated_since_start" => "8165.5"} [AFTER load] {"used" => "14648", "free" => "3620", "ever_allocated_since_compact" => "57827.6", "ever_allocated_since_start" => "306299"} [AFTER import] {"used" => "24584", "free" => "7900", "ever_allocated_since_compact" => "14020.2", "ever_allocated_since_start" => "658280"} [BEFORE 2] {"used" => "24608", "free" => "7876", "ever_allocated_since_compact" => "14933.9", "ever_allocated_since_start" => "659194"} [BEFORE load] {"used" => "24608", "free" => "7876", "ever_allocated_since_compact" => "14967.8", "ever_allocated_since_start" => "659228"} [AFTER load] {"used" => "31188", "free" => "1296", "ever_allocated_since_compact" => "28604.2", "ever_allocated_since_start" => "957702"} [AFTER import] {"used" => "34736", "free" => "5940", "ever_allocated_since_compact" => "10538.1", "ever_allocated_since_start" => "1.31113e+06"} [BEFORE 3] {"used" => "34760", "free" => "5916", "ever_allocated_since_compact" => "11452.9", "ever_allocated_since_start" => "1.31204e+06"} [BEFORE load] {"used" => "34760", "free" => "5916", "ever_allocated_since_compact" => "11486.9", "ever_allocated_since_start" => "1.31207e+06"} [AFTER load] {"used" => "41064", "free" => "7804", "ever_allocated_since_compact" => "154914", "ever_allocated_since_start" => "1.60606e+06"} [AFTER import] {"used" => "44200", "free" => "4668", "ever_allocated_since_compact" => "28073", "ever_allocated_since_start" => "1.96236e+06"}Правильно ли я понимаю, что "по идеи" на начало следующего цикла used памяти на начало каждого цикла в @main должно быть примерно около начального значения? ([BEFORE 1] "used" => "4524")