1. tcmalloc中文版:http://shiningray.cn/tcmalloc-thread-caching-malloc.html2. heapprofiler:http://gperftools.googlecode.com/svn/trunk/doc/heapprofile.html...
分类:
其他好文 时间:
2015-04-30 10:22:18
阅读次数:
111
对10000个1-10000的随机数进行排序,并显示出运行时间数组是用以前用VC++&MatLab生成的,比较长。。。哈哈,感受一下计算机的速度!#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<limits.h>
#include<malloc.h>
#inclu..
分类:
编程语言 时间:
2015-04-30 01:14:30
阅读次数:
1778
//SeqStack.h
typedefstructstack
{
DATAdata[SIZE+1];//数据元素
inttop;//栈顶
}SeqStack;
SeqStack*SeqStackInit()
{
SeqStack*p;
if(p=(SeqStack*)(malloc)(sizeof(SeqStack)))//申请栈内存
{
p->top=0;//设置栈顶为零
returnp;//返回指向栈的指针
}
returnN..
分类:
其他好文 时间:
2015-04-30 01:12:54
阅读次数:
205
这一系列博客的特点就是——给出每趟排序的结果本来想着好好写一下过程,弄个图片什么的,不过觉得网上的解析太多了,都比较好,所以这些博客就算是对自己的总结吧。#include<stdio.h>
#include<limits.h>
#include<malloc.h>
inta[10]={2,8,5,7,4,3,1,9,6,..
分类:
编程语言 时间:
2015-04-29 20:00:47
阅读次数:
172
//SeqStack.h
typedefstructstack
{
DATAdata[SIZE+1];//数据元素
inttop;//栈顶
}SeqStack;
SeqStack*SeqStackInit()
{
SeqStack*p;
if(p=(SeqStack*)(malloc)(sizeof(SeqStack)))//申请栈内存
{
p->top=0;//设置栈顶为零
returnp;//返回指向栈的指针
}
returnN..
分类:
其他好文 时间:
2015-04-29 07:24:06
阅读次数:
130
//SeqStack.h
typedefstructstack
{
DATAdata[SIZE+1];//数据元素
inttop;//栈顶
}SeqStack;
SeqStack*SeqStackInit()
{
SeqStack*p;
if(p=(SeqStack*)(malloc)(sizeof(SeqStack)))//申请栈内存
{
p->top=0;//设置栈顶为零
returnp;//返回指向栈的指针
}
returnN..
分类:
其他好文 时间:
2015-04-29 07:23:27
阅读次数:
114
今天调试程序遇到下面一个错误:
unexpected end of file found in comment
#include"List.h"
void InitList(List *list)
{
Node *s = (Node *)malloc(sizeof(Node));
assert(s != NULL);
s->next = NULL;
list->first = lis...
分类:
其他好文 时间:
2015-04-28 21:02:31
阅读次数:
154
//顺序队列操作
#defineQUEUEMAX15
typedefstruct
{
DATAdata[QUEUEMAX];//队列数组
inthead;//队头
inttail;//队尾
}SeqQueue;
SeqQueue*SeqQueueInit()
{
SeqQueue*q;
if(q=(SeqQueue*)malloc(sizeof)(SeqQueue))//申请保存队列的内存
{
q->head=0;//设置队头
q..
分类:
其他好文 时间:
2015-04-28 18:48:44
阅读次数:
127
//循环队列
//CycQueue.h
#defineQUEUEMAX15
typedefstruct
{
DATAdata[QUEUEMAX];//队列数组
inthead;//队头
inttail;//队尾
}CycQueue;
CycQueue*CycQueueInit()
{
CycQueue*q;
if(q=(CycQueue*)malloc(sizeof(CycQueue)))//申请保存队列的内存
{
q->head=0;//设..
分类:
其他好文 时间:
2015-04-28 18:44:35
阅读次数:
128
//循环队列
//CycQueue.h
#defineQUEUEMAX15
typedefstruct
{
DATAdata[QUEUEMAX];//队列数组
inthead;//队头
inttail;//队尾
}CycQueue;
CycQueue*CycQueueInit()
{
CycQueue*q;
if(q=(CycQueue*)malloc(sizeof(CycQueue)))//申请保存队列的内存
{
q->head=0;//设..
分类:
其他好文 时间:
2015-04-28 18:42:40
阅读次数:
134