heap block 引发的思考
问题背景:
Implicit Free Lists
Any practical allocator needs some data structure that allows it to distinguish block boundaries and to distinguish between allo...
分类:
其他好文 时间:
2014-07-27 23:38:29
阅读次数:
452
最近发现几个好用的工具,顺便总结下。procps-ng: top, free, ps, pgrep, vmstat ...sysstat: iostat, sar ...lsof,iftop,mtr,htopcv:新发现的监控cp,dd等即时速度的nmon:从AIX鼎鼎大名的topas移植过来的ds...
分类:
系统相关 时间:
2014-07-27 10:04:32
阅读次数:
333
Javascript接收字符串生成XMLDOM对象。实测对Firefox、IE6有效。可用于解析ajax的服务器响应结果,也可用于解析自定义字符串。?1. [代码]函数 ppt模版/*** Parses DOM from XML text.** @author Typhoon.Free.Wolf* ...
分类:
编程语言 时间:
2014-07-25 19:04:51
阅读次数:
263
题目:给定链表的头指针和一个结点指针,在O(1)时间删除该结点。具体思路:把头结点的数据直接copy到要删除的结点处,然后头指针向后移动一个结点,再free掉原来的头指针指向的结点,这样等于把要删除的结点删除了。当链表只有一个结点或者要删除的结点是头结点或尾结点时,这种方法也是成立的,所以不需要做特...
分类:
其他好文 时间:
2014-07-25 13:54:31
阅读次数:
204
1.清理前内存使用情况free -m2.开始清理echo 1 > /proc/sys/vm/drop_caches3.清理后内存使用情况free -m4.完成!查看内存条数命令:dmidecode|grep-A16"MemoryDevice$"++++++++++++++++++++++++++++...
分类:
系统相关 时间:
2014-07-24 21:23:26
阅读次数:
276
帮别人调试个程序,程序的功能主要涉及动态数组,实现动态数组元素的添加,删除,查找,显示功能。但是在执行添加功能的时候,连续执行三次添加的时候就会出现问题,让人感到非常的莫名其妙。
涉及到的函数如下所示:
void adddata(int * arr, int * len)
{
int n;
int *add;
int cnt=0, t1;...
分类:
其他好文 时间:
2014-07-24 10:38:22
阅读次数:
342
Fear can hold you prisoner, hope can set you free. A strong man can save himself, a great man can save another.懦怯囚禁人的灵魂,希望可以令你感受自由。强者自救,圣者渡人。 ...
分类:
其他好文 时间:
2014-07-23 18:04:05
阅读次数:
207
Staff and children backpack can be worn as a backpack or diaper bag carries ramieniu.Plecak keep residents in the arm keeps your hands free to perform...
分类:
其他好文 时间:
2014-07-22 22:41:35
阅读次数:
290
# Copyright 2006 Joe Wreschnig## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public Li...
分类:
其他好文 时间:
2014-07-22 22:36:33
阅读次数:
351
第十一章 动态内存分配
数组在声明的时候,本身作为一个指针常量,它在编译时候内存就已经被分配好了。但是有时候程序不知道这个数组到底有多长,所以,为了防止内存的浪费,C提供了动态内存分配的策略。
其实,作为独立的一章,本章显得内容不多。malloc,free,calloc,realloc就没有了,但是它包含很多用法,也有很多陷阱。
总结:
malloc和calloc函数都用于动态分配...
分类:
其他好文 时间:
2014-07-21 23:23:53
阅读次数:
265