jmalloc.h

来自「kaffe Java 解释器语言,源码,Java的子集系统,开放源代码」· C头文件 代码 · 共 43 行

H
43
字号
/* * jmalloc.h * Define the jmalloc/jfree functions * * Copyright (c) 1998 *      Transvirtual Technologies, Inc.  All rights reserved. * * See the file "license.terms" for information on usage and redistribution * of this file. */#ifndef __jmalloc_h#define __jmalloc_h#include <stdlib.h> /* * Kaffe GC-aware replacements for malloc() and free(). Note that * there's no jcalloc() because jmalloc() returns zero'd memory. */extern void*	jmalloc(size_t bytes);extern void*	jrealloc(void* ptr, size_t bytes);extern void	jfree(void* ptr);#define KMALLOC(A)	jmalloc(A)#define KREALLOC(A, B)	jrealloc((A), (B))#define KCALLOC(A, B)	jmalloc((A) * (B))#define KFREE(p)	jfree((void *)(p))#ifdef KAFFE_VMDEBUG/* Clear pointers after freeing the data,  * to aid debugging. * */#undef KFREEstatic inline void KFREE(const void *p) {	jfree ((void *)p);	p = (void *)0;}#endif#endif

⌨️ 快捷键说明

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