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 - -!
  • 相关阅读:
    django--orm操作
    路由
    django ----视图和路由
    DJango 前三天小结
    JQuery----操作01
    前端---JQuery初识
    前端----jsDOM
    前端---js02
    前端-----js
    面向对象
  • 原文地址:https://www.cnblogs.com/a-flydog/p/5751406.html
Copyright © 2011-2022 走看看