Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions | Variables
new_gc_alloc.h File Reference
#include "gc.h"
#include <stack>
#include <stddef.h>
#include <string.h>

Go to the source code of this file.

Classes

class  GC_aux_template< dummy >
class  single_client_gc_alloc_template< dummy >
class  single_client_traceable_alloc_template< dummy >
class  gc_alloc_template< dummy >
class  traceable_alloc_template< dummy >

Defines

#define GC_ALLOC_H
#define __GC_SPECIALIZE(T, alloc)

Typedefs

typedef GC_aux_template< 0 > GC_aux
typedef
single_client_gc_alloc_template< 0 > 
single_client_gc_alloc
typedef
single_client_traceable_alloc_template< 0 > 
single_client_traceable_alloc
typedef gc_alloc_template< 0 > gc_alloc
typedef
traceable_alloc_template< 0 > 
traceable_alloc

Enumerations

enum  { GC_PTRFREE = 0, GC_NORMAL = 1, GC_UNCOLLECTABLE = 2, GC_AUNCOLLECTABLE = 3 }
enum  { GC_max_fast_bytes = 255 }
enum  { GC_bytes_per_word = sizeof(char *) }
enum  { GC_byte_alignment = 8 }
enum  { GC_word_alignment = GC_byte_alignment/GC_bytes_per_word }

Functions

void GC_incr_words_allocd (size_t words)
void GC_incr_mem_freed (size_t words)
char * GC_generic_malloc_words_small (size_t word, int kind)
void *& GC_obj_link (void *p)
size_t GC_round_up (size_t n)
size_t GC_round_up_uncollectable (size_t n)

Variables

void **const GC_objfreelist_ptr
void **const GC_aobjfreelist_ptr
void **const GC_uobjfreelist_ptr
void **const GC_auobjfreelist_ptr

Define Documentation

#define __GC_SPECIALIZE (   T,
  alloc 
)
Value:
class simple_alloc<T, alloc> { \
public: \
    static T *allocate(size_t n) \
       { return 0 == n? 0 : \
                      reinterpret_cast<T*>(alloc::ptr_free_allocate(n * sizeof (T))); } \
    static T *allocate(void) \
       { return reinterpret_cast<T*>(alloc::ptr_free_allocate(sizeof (T))); } \
    static void deallocate(T *p, size_t n) \
       { if (0 != n) alloc::ptr_free_deallocate(p, n * sizeof (T)); } \
    static void deallocate(T *p) \
       { alloc::ptr_free_deallocate(p, sizeof (T)); } \
};

Definition at line 350 of file new_gc_alloc.h.

#define GC_ALLOC_H

Definition at line 76 of file new_gc_alloc.h.


Typedef Documentation

Definition at line 331 of file new_gc_alloc.h.

typedef GC_aux_template<0> GC_aux

Definition at line 182 of file new_gc_alloc.h.

Definition at line 253 of file new_gc_alloc.h.

Definition at line 319 of file new_gc_alloc.h.

Definition at line 343 of file new_gc_alloc.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
GC_PTRFREE 
GC_NORMAL 
GC_UNCOLLECTABLE 
GC_AUNCOLLECTABLE 

Definition at line 100 of file new_gc_alloc.h.

anonymous enum
Enumerator:
GC_max_fast_bytes 

Definition at line 103 of file new_gc_alloc.h.

{ GC_max_fast_bytes = 255 };
anonymous enum
Enumerator:
GC_bytes_per_word 

Definition at line 105 of file new_gc_alloc.h.

{ GC_bytes_per_word = sizeof(char *) };
anonymous enum
Enumerator:
GC_byte_alignment 

Definition at line 107 of file new_gc_alloc.h.

anonymous enum
Enumerator:
GC_word_alignment 

Definition at line 109 of file new_gc_alloc.h.


Function Documentation

char* GC_generic_malloc_words_small ( size_t  word,
int  kind 
)
void GC_incr_mem_freed ( size_t  words)
void GC_incr_words_allocd ( size_t  words)
void* & GC_obj_link ( void p) [inline]

Definition at line 111 of file new_gc_alloc.h.

{   return *reinterpret_cast<void **>(p);  }
size_t GC_round_up ( size_t  n) [inline]

Definition at line 116 of file new_gc_alloc.h.

size_t GC_round_up_uncollectable ( size_t  n) [inline]

Definition at line 122 of file new_gc_alloc.h.


Variable Documentation

Definition at line 35 of file mallocx.c.

Definition at line 34 of file mallocx.c.

Definition at line 36 of file mallocx.c.