|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!-- $Revision$ --> |
| 3 | +<refentry xml:id="function.memory-reset-peak-usage" xmlns="http://docbook.org/ns/docbook"> |
| 4 | + <refnamediv> |
| 5 | + <refname>memory_reset_peak_usage</refname> |
| 6 | + <refpurpose>Reset the peak memory usage</refpurpose> |
| 7 | + </refnamediv> |
| 8 | + |
| 9 | + <refsect1 role="description"> |
| 10 | + &reftitle.description; |
| 11 | + <methodsynopsis> |
| 12 | + <type>void</type><methodname>memory_reset_peak_usage</methodname> |
| 13 | + <void/> |
| 14 | + </methodsynopsis> |
| 15 | + <para> |
| 16 | + Resets the peak memory usage returned by the |
| 17 | + <function>memory_get_peak_usage</function> function. |
| 18 | + </para> |
| 19 | + </refsect1> |
| 20 | + |
| 21 | + <refsect1 role="parameters"> |
| 22 | + &reftitle.parameters; |
| 23 | + &no.function.parameters; |
| 24 | + </refsect1> |
| 25 | + |
| 26 | + <refsect1 role="returnvalues"> |
| 27 | + &reftitle.returnvalues; |
| 28 | + <para> |
| 29 | + &return.void; |
| 30 | + </para> |
| 31 | + </refsect1> |
| 32 | + |
| 33 | + <refsect1 role="examples"> |
| 34 | + &reftitle.examples; |
| 35 | + <para> |
| 36 | + <example> |
| 37 | + <title><function>memory_reset_peak_usage</function> example</title> |
| 38 | + <programlisting role="php"> |
| 39 | +<![CDATA[ |
| 40 | +<?php |
| 41 | +
|
| 42 | +var_dump(memory_get_peak_usage()); |
| 43 | +
|
| 44 | +$a = str_repeat("Hello", 424242); |
| 45 | +var_dump(memory_get_peak_usage()); |
| 46 | +
|
| 47 | +unset($a); |
| 48 | +memory_reset_peak_usage(); |
| 49 | +
|
| 50 | +$a = str_repeat("Hello", 2424); |
| 51 | +var_dump(memory_get_peak_usage()); |
| 52 | +
|
| 53 | +?> |
| 54 | +]]> |
| 55 | + </programlisting> |
| 56 | + &example.outputs.similar; |
| 57 | + <screen> |
| 58 | +<![CDATA[ |
| 59 | +int(422440) |
| 60 | +int(2508672) |
| 61 | +int(399208) |
| 62 | +]]> |
| 63 | + </screen> |
| 64 | + </example> |
| 65 | + </para> |
| 66 | + </refsect1> |
| 67 | + |
| 68 | + <refsect1 role="seealso"> |
| 69 | + &reftitle.seealso; |
| 70 | + <para> |
| 71 | + <simplelist> |
| 72 | + <member><function>memory_get_peak_usage</function></member> |
| 73 | + </simplelist> |
| 74 | + </para> |
| 75 | + </refsect1> |
| 76 | + |
| 77 | +</refentry> |
| 78 | +<!-- Keep this comment at the end of the file |
| 79 | +Local variables: |
| 80 | +mode: sgml |
| 81 | +sgml-omittag:t |
| 82 | +sgml-shorttag:t |
| 83 | +sgml-minimize-attributes:nil |
| 84 | +sgml-always-quote-attributes:t |
| 85 | +sgml-indent-step:1 |
| 86 | +sgml-indent-data:t |
| 87 | +indent-tabs-mode:nil |
| 88 | +sgml-parent-document:nil |
| 89 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 90 | +sgml-exposed-tags:nil |
| 91 | +sgml-local-catalogs:nil |
| 92 | +sgml-local-ecat-files:nil |
| 93 | +End: |
| 94 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 95 | +vim: et tw=78 syn=sgml |
| 96 | +vi: ts=1 sw=1 |
| 97 | +--> |
0 commit comments