搜索结果
找到约 44 项符合
MALLOC 的查询结果
按分类筛选
数据结构 2.[问题描述] 编写递归算法
2.[问题描述]
编写递归算法,在二叉树中求位于先序序列中第K个位置的结点
[输入]
按照先序序列的顺序输入该结点的内容。其输入abd eh cf i g 。输入要求的位置
[输出]
若二叉树不空,按先序序列输出,求出所求位置的结点
[存储结构]
采用二叉表存储
[算法的基本思想]
采用递归方法建立和遍历二叉树。首先建立二叉树的根结 ...
其他嵌入式/单片机内容 C语言内存管理源码
C语言内存管理源码,一个介绍Malloc实现的源码。嵌入式系统里面可以参考,以了解如何减少内存碎片的问题!
嵌入式/单片机编程 一个类STL的多平台可移植的算法容器库,主要用于嵌入式系统编程时的内存管理等方面
一个类STL的多平台可移植的算法容器库,主要用于嵌入式系统编程时的内存管理等方面,尤其是缺少支持malloc 和free的情况下。
操作系统开发 编写一个C程序
编写一个C程序,用char *malloc(unsigned size)函数向系统申请一次内存空间(如size=1000,单位为字节),用循环首次适应法
addr = (char *)lmalloc(unsigned size) 和
lfree(unsigned size,char * addr)模拟可变分区内存管理,实现对该内存区的分配和释放管理。 ...
Linux/Unix编程 内存越界操作检测工具
内存越界操作检测工具,既可以在windows下使用,也可以在linux下使用,作为动态库链入可执行档即可使用里面的malloc
文件格式 在程序中输入数组大小n
在程序中输入数组大小n,通过动态分配内存函数malloc产生一个整型数组,接着输入该数组的n个元数,并使用一个函数对组数进行排序(从小到大,要求用选择法实现)
嵌入式Linux 小型内存分配模块,用通用循环双向链表实现
小型内存分配模块,用通用循环双向链表实现,改程序模拟系统malloc
Linux/uClinux/Unix编程 两个链表的交集
两个链表的交集
#include<stdio.h>
#include<stdlib.h>
typedef struct Node{
&nbsp; int data;
&nbsp; struct &nbsp;Node *next;
}Node;
void initpointer(struct Node *p){
&nbsp; p=NULL;
}
int &nbsp;printlist(struct Node* head){
&nbsp; int flag=1;
&nbsp; head=head->next;
&nbsp; /*
&nbsp; 因为标记1的地 ...
源码 利用栈的基本操作实现将任意一个十进制整数N转化为R进制整数。
#include <stdlib.h>
#include<stdio.h>
#include <malloc.h>
#define stack_init_size 100
#define stackincrement 10
typedef struct sqstack
{
int *base;
int *top;
int stacksize;
} sqstack;
int StackInit(sqstack *s)
{
s->base=(int *)malloc(stack_init_size *sizeof(int));
if(!s->base)
return 0;
s->top=s->ba ...
源码 运动会源代码
#include&nbsp;<malloc.h>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
#include&nbsp;<stdio.h>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
#include&nbsp;<stdlib.h>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
#include&nbsp;<string.h>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
#define&nbsp;NULL&nbsp;0&nbsp;&nbsp; &nbsp;&nbsp ...