philip          Sat Jun  7 11:20:43 2003 EDT

  Added files:                 
    /phpdoc/en/reference/info/functions memory-get-usage.xml 
  Log:
  Initial documentation.
  
  

Index: phpdoc/en/reference/info/functions/memory-get-usage.xml
+++ phpdoc/en/reference/info/functions/memory-get-usage.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.memory-get-usage">
   <refnamediv>
    <refname>memory_get_usage</refname>
    <refpurpose>Returns the amount of memory allocated to PHP</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>memory_get_usage</methodname>
      <void />
     </methodsynopsis>
    <para>
     Returns the amount of memory, in bytes, that's currently being
     allocated to your PHP script.
    </para>
    <para>
     <function>memory_get_usage</function> will only be defined if your PHP
     is compiled with the <literal>--enable-memory-limit</literal> 
     configuration option.
    </para>
    <para>
     <example>
      <title>A <function>memory_get_usage</function> example</title>
      <programlisting role="php">
<![CDATA[
<?php
// This is only an example, the numbers below will 
// differ depending on your system

echo memory_get_usage() . "\n"; // 36640

$a = str_repeat("Hello", 4242);

echo memory_get_usage() . "\n"; // 57960

unset($a);

echo memory_get_usage() . "\n"; // 36744

?>
]]>
      </programlisting>
     </example>
    </para>
    <para>
     See also 
     <link linkend="ini.memory-limit">memory-limit</link>.
    </para>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to