3 Star 0 Fork 0

Gitee 极速下载 / gnustep-objective-c-runtime

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/gnustep/libobjc2
Clone or Download
gc_ops.h 1.37 KB
Copy Edit Raw Blame History
David Chisnall authored 2023-02-19 14:11 . Remove Boehm GC support code.
/**
* Garbage collection operations.
*/
struct gc_ops
{
/**
* Initialises this collector.
*/
void (*init)(void);
/**
* Allocates enough space for a class, followed by some extra bytes.
*/
id (*allocate_class)(Class, size_t);
/**
* Frees an object.
*/
void (*free_object)(id);
/**
* Allocates some memory that can be used to store pointers. This must be
* used instead of malloc() for internal data structures that will store
* pointers passed in from outside. The function is expected to zero the
* memory that it returns.
*/
void* (*malloc)(size_t);
/**
* Frees some memory that was previously used to store pointers.
*/
void (*free)(void*);
};
/**
* The mode for garbage collection
*/
enum objc_gc_mode
{
/** This module neither uses, nor supports, garbage collection. */
GC_None = 0,
/**
* This module uses garbage collection, but also sends retain / release
* messages. It can be used with or without GC.
*/
GC_Optional = 1,
/**
* This module expects garbage collection and will break without it.
*/
GC_Required = 2,
/**
* This module was compiled with automatic reference counting. This
* guarantees the use of the non-fragile ABI and means that we could
* potentially support GC, although we don't currently.
*/
GC_ARC = 3
};
/**
* The current set of garbage collector operations to use.
*/
extern struct gc_ops *gc;
C/C++
1
https://gitee.com/mirrors/gnustep-objective-c-runtime.git
git@gitee.com:mirrors/gnustep-objective-c-runtime.git
mirrors
gnustep-objective-c-runtime
gnustep-objective-c-runtime
master

Search