mem.h

来自「一个小型的操作系统,采用gcc进行开发,几千行的代码,方便初学者学习」· C头文件 代码 · 共 36 行

H
36
字号
/**  Snixos Project version 1.0, 2003.6*  (C) Copyright 2003,2004,2005 Jockeyson,KeqiangGao <Snallie@tom.com>*  All Rights Reserved.*  Distributed under the terms of the GNU General Public License.**  This program is a free and open source software and you can redistribute *  it and/or modify it under the terms of the GNU General Public License as*  published by the Free Software Foundation. As no any liablity is assumed *  for any incidental or consequential damages in connection with the *  information or program fragments contained herein,so any exception arised*  is at your own risk. It is ABSOLUTELY WITHOUT ANY WARRANTY.*  Bug report please send to Snallie@tom.com .*//*  mem.h   : header file of mem.c for the Snixos OS project  Author  : snallie@tom.com  Time    : 2003.6*/#ifndef _MEM_H #define _MEM_H #include "stdio.h" // size_t definitionvoid *kmalloc(int size);void kfree(void *blk);void *krealloc(void *blk, int size);void *kcalloc(size_t nmemb, size_t size);#define malloc kmalloc#define free kfree#define realloc krealloc#define calloc kcalloc#endif /* _MEM_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?