gc2.h

来自「linux下建立JAVA虚拟机的源码KAFFE」· C头文件 代码 · 共 41 行

H
41
字号
/* * gc2.h * This interfaces the VM to the Hans-J. Boehm Incremental Garbage * Collector (version 6.0 alpha 7). * Copyright (c) 2004 *      The Kaffe.org's developers. All rights reserved.  *      See ChangeLog for details. * * See the file "license.terms" for information on usage and redistribution  * of this file.  */#ifndef _KAFFE_BOEHM_GC_H#define _KAFFE_BOEHM_GC_H#include "defs.h"#include "boehm/include/gc.h"#include "boehm/include/gc_mark.h"typedef struct _gcMark {  struct GC_ms_entry *mark_current;  struct GC_ms_entry *mark_limit;  GC_PTR original_object;} gcMark;typedef struct {  uint32 magic;  uint8 memtype;  uint8 needFinal;  size_t memsize;} MemDescriptor;#define SIZEOF_DESC (((sizeof(MemDescriptor) + ALIGNMENTOF_VOIDP - 1) / ALIGNMENTOF_VOIDP) * ALIGNMENTOF_VOIDP)#define SYSTEM_SIZE(s) ((s) + SIZEOF_DESC)#define USER_SIZE(s) ((s) - SIZEOF_DESC)#define ALIGN_FORWARD(p) ((void *)((uintp)(p) + SIZEOF_DESC))#define ALIGN_BACKWARD(p) ((void *)((uintp)(p) - SIZEOF_DESC))#endif

⌨️ 快捷键说明

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