zoukankan      html  css  js  c++  java
  • php的内存分配还是很智能的

    <?php

    echo memory_get_usage().PHP_EOL;
    $a = 1;
    $b = $a;
    echo memory_get_usage().PHP_EOL;

    <?php

    echo memory_get_usage().PHP_EOL;
    $a = 1;
    $b = 1;
    echo memory_get_usage().PHP_EOL;

    第一个比第二个省内存

    PS D:WWWphp-> php .memery_get_usage.php                                                                   
    225664                                                                                                       
    225936                                                                                                       
    PS D:WWWphp->                                                                                              
    PS D:WWWphp-> php .memery_get_usage.php                                                                   
    225696                                                                                                       
    226032          
     
    c结构体 zval - -!
  • 相关阅读:
    [Leetcode] Copy List with Random Pointer
    [Java] StringBuffer类
    [Leetcode] Wildcard Matching
    [Leetcode] Substring with Concatenation of All Words
    [Leetcode] Longest Palindromic Substring
    [Leetcode] Maximum Product Subarray
    [leetcode] Permutation Sequence
    [Leetcode] Simplify Path
    [Leetcode] Minimum Window Substring
    Owin asp.net 脱离 IIS
  • 原文地址:https://www.cnblogs.com/a-flydog/p/5751406.html
Copyright © 2011-2022 走看看