Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:989 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25572 invoked from network); 21 Apr 2003 10:49:04 -0000 Received: from unknown (HELO unity.copyleft.no) (212.71.72.23) by pb1.pair.com with SMTP; 21 Apr 2003 10:49:04 -0000 Received: from vegard (helo=localhost) by unity.copyleft.no with local-esmtp (Exim 3.36 #1) id 197Yr9-000NF6-00 for internals@lists.php.net; Mon, 21 Apr 2003 12:49:03 +0200 Date: Mon, 21 Apr 2003 12:49:03 +0200 (CEST) To: internals@lists.php.net Message-ID: <20030421124532.F86580-100000@unity.copyleft.no> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: "Vegard Munthe,Copyleft Software" Subject: Memory. From: vegard@copyleft.no (Vegard Munthe) I've asked these questions a number of other places. It seems no-one really knows. So, even if this might not be the right list for these questions, I hope someone can bare with me and help answer a few questions, or direct me to someone or some doc that can. Questions: 1) Since there are no functions to tell the memory usage of variables and objects, is there a way to calculate memory usage of variables and objects? 2) When a script loads different files as includes, does it take from the memory_limit pool of memory? 3) When leaving a function, are variables in the function's scope freed? I.e. is the memory used by a function completely freed for the rest of the script to reuse? 4) Is there any way to free memory used within a script? Does for instance $var = ""; free the memory previously used by $var? 5) Is it not aa good idea to use objects if you plan to collect thousends of them in PHP? Do they for some reason take up substantially more memory than other variables? Thank you for any answers, or help in finding the right people to ask. -- Vego