⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 imalloc.h

📁 T-kernel 的extension源代码
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	imalloc.h * *	Memory allocation for kernel * *	Function of allocating memory used in part of T-Kernel. *	Generally, it must not be used from application. */#ifndef __SYS_IMALLOC_H__#define __SYS_IMALLOC_H__#include <basic.h>#include <tk/typedef.h>#include <tk/sysmgr.h>#ifdef __cplusplusextern "C" {#endif/* * Allocate resident memory with the lowest possible protection level (TSVCLimit) * that allows T-Kernel's system call. */IMPORT void*	Imalloc( size_t size );IMPORT void*	Icalloc( size_t nmemb, size_t size );IMPORT void	Ifree( void *ptr );/* * Allocate memory whose attribute is specified by attr. *	attr = TA_RNGn | TA_NORESIDENT */IMPORT void*	IAmalloc( size_t size, UINT attr );IMPORT void*	IAcalloc( size_t nmemb, size_t size, UINT attr );IMPORT void	IAfree( void *ptr, UINT attr );/* * In either case, malloc and calloc cannot be called while interrupt and dispatch * are disabled. * In either case, only free can be called while interrupt and dispatch are disabled. * However, a memory area may not be freed completely in this case, so it is desirable * to call it while both interrupt and dispatch are enabled. * If a memory area is not freed completely, the area is subsequently allocated * by malloc and calloc. *//* ------------------------------------------------------------------------ *//* * System memory management on a block basis */IMPORT VP	GetSysMemBlk( INT nblk, UINT attr );IMPORT ER	RelSysMemBlk( VP addr );IMPORT ER	RefSysMemInfo( T_RSMB *rsmb );#ifdef __cplusplus}#endif#endif /* __SYS_IMALLOC_H__ */

⌨️ 快捷键说明

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