Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions
gc_cpp.h File Reference
#include "gc.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gc
class  gc_cleanup

Defines

#define GC_cdecl
#define GC_OPERATOR_NEW_ARRAY
#define GC_PLACEMENT_DELETE

Typedefs

typedef void(* GCCleanUpFunc )(void *obj, void *clientData)

Enumerations

enum  GCPlacement {
  UseGC, GC = UseGC, NoGC, PointerFreeGC,
  UseGC, AtomicGC
}

Functions

voidoperator new (size_t size, GCPlacement gcp, GCCleanUpFunc cleanup=0, void *clientData=0)
voidoperator new[] (size_t size, GCPlacement gcp, GCCleanUpFunc cleanup=0, void *clientData=0)

Define Documentation

#define GC_cdecl

Definition at line 137 of file gc_cpp.h.

Definition at line 152 of file gc_cpp.h.

Definition at line 157 of file gc_cpp.h.


Typedef Documentation

typedef void(* GCCleanUpFunc)(void *obj, void *clientData)

Definition at line 204 of file gc_cpp.h.


Enumeration Type Documentation

Enumerator:
UseGC 
GC 
NoGC 
PointerFreeGC 
UseGC 
AtomicGC 

Definition at line 160 of file gc_cpp.h.

                 {UseGC,
#ifndef GC_NAME_CONFLICT
                GC=UseGC,
#endif
                  NoGC, PointerFreeGC};

Function Documentation

void * operator new ( size_t  size,
GCPlacement  gcp,
GCCleanUpFunc  cleanup = 0,
void clientData = 0 
) [inline]

Definition at line 333 of file gc_cpp.h.

{
    void* obj;

    if (gcp == UseGC) {
        obj = GC_MALLOC( size );
        if (cleanup != 0) 
            GC_REGISTER_FINALIZER_IGNORE_SELF( 
                obj, cleanup, clientData, 0, 0 );}
    else if (gcp == PointerFreeGC) {
        obj = GC_MALLOC_ATOMIC( size );}
    else {
        obj = GC_MALLOC_UNCOLLECTABLE( size );};
    return obj;}
void * operator new[] ( size_t  size,
GCPlacement  gcp,
GCCleanUpFunc  cleanup = 0,
void clientData = 0 
) [inline]

Definition at line 355 of file gc_cpp.h.

{
    return ::operator new( size, gcp, cleanup, clientData );}

Here is the call graph for this function: