📄 free.c
字号:
/***********************************************************************/
/* This file is part of the C51 Compiler package */
/* Copyright KEIL ELEKTRONIK GmbH 1993 */
/***********************************************************************/
/* */
/* FREE.C: */
/* */
/* To translate this file use C51 with the following invocation: */
/* */
/* C51 FREE.C <memory model> */
/* */
/* To link the modified FREE.OBJ file to your application use the */
/* following L51 invocation: */
/* */
/* L51 <your object file list>, FREE.OBJ <controls> */
/* */
/***********************************************************************/
struct mem {
struct mem xdata *next;
struct mem xdata *prev;
unsigned int len;
unsigned char mem[1];
};
void free (struct mem xdata *p) {
struct mem xdata *op;
if (!p) return;
p = (void xdata *) p - (sizeof (struct mem) - 1);
if (op = p->prev) {
op->next = p->next;
if (p->next) p->next->prev = op;
}
else p->len = 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -