Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions
single_client_gc_alloc_template< dummy > Class Template Reference

#include <gc_alloc.h>

List of all members.

Static Public Member Functions

static voidallocate (size_t n)
static voidptr_free_allocate (size_t n)
static void deallocate (void *p, size_t n)
static void ptr_free_deallocate (void *p, size_t n)
static voidallocate (size_t n)
static voidptr_free_allocate (size_t n)
static void deallocate (void *p, size_t n)
static void ptr_free_deallocate (void *p, size_t n)

Detailed Description

template<int dummy>
class single_client_gc_alloc_template< dummy >

Definition at line 171 of file gc_alloc.h.


Member Function Documentation

template<int dummy>
static void* single_client_gc_alloc_template< dummy >::allocate ( size_t  n) [inline, static]

Definition at line 167 of file new_gc_alloc.h.

        {
           size_t nwords = GC_round_up(n);
           void ** flh;
           void * op;

           if (n > GC_max_fast_bytes) return GC_malloc(n);
           flh = GC_objfreelist_ptr + nwords;
           if (0 == (op = *flh)) {
              return GC_aux::GC_out_of_line_malloc(nwords, GC_NORMAL);
           }
           *flh = GC_obj_link(op);
           GC_aux::GC_words_recently_allocd += nwords;
           return op;
        }

Here is the call graph for this function:

template<int dummy>
static void* single_client_gc_alloc_template< dummy >::allocate ( size_t  n) [inline, static]

Definition at line 173 of file gc_alloc.h.

        {
           size_t nwords = GC_round_up(n);
           void ** flh;
           void * op;

           if (n > GC_max_fast_bytes) return GC_malloc(n);
           flh = GC_objfreelist_ptr + nwords;
           if (0 == (op = *flh)) {
              return GC_aux::GC_out_of_line_malloc(nwords, GC_NORMAL);
           }
           *flh = GC_obj_link(op);
           GC_aux::GC_words_recently_allocd += nwords;
           return op;
        }

Here is the call graph for this function:

template<int dummy>
static void single_client_gc_alloc_template< dummy >::deallocate ( void p,
size_t  n 
) [inline, static]

Definition at line 197 of file new_gc_alloc.h.

       {
            size_t nwords = GC_round_up(n);
            void ** flh;
          
           if (n > GC_max_fast_bytes)  {
              GC_free(p);
           } else {
               flh = GC_objfreelist_ptr + nwords;
               GC_obj_link(p) = *flh;
              memset((char *)p + GC_bytes_per_word, 0,
                     GC_bytes_per_word * (nwords - 1));
               *flh = p;
               GC_aux::GC_mem_recently_freed += nwords;
           }
       }

Here is the call graph for this function:

template<int dummy>
static void single_client_gc_alloc_template< dummy >::deallocate ( void p,
size_t  n 
) [inline, static]

Definition at line 203 of file gc_alloc.h.

       {
            size_t nwords = GC_round_up(n);
            void ** flh;
          
           if (n > GC_max_fast_bytes)  {
              GC_free(p);
           } else {
               flh = GC_objfreelist_ptr + nwords;
               GC_obj_link(p) = *flh;
              memset((char *)p + GC_bytes_per_word, 0,
                     GC_bytes_per_word * (nwords - 1));
               *flh = p;
               GC_aux::GC_mem_recently_freed += nwords;
           }
       }

Here is the call graph for this function:

template<int dummy>
static void* single_client_gc_alloc_template< dummy >::ptr_free_allocate ( size_t  n) [inline, static]

Definition at line 182 of file new_gc_alloc.h.

        {
           size_t nwords = GC_round_up(n);
           void ** flh;
           void * op;

           if (n > GC_max_fast_bytes) return GC_malloc_atomic(n);
           flh = GC_aobjfreelist_ptr + nwords;
           if (0 == (op = *flh)) {
              return GC_aux::GC_out_of_line_malloc(nwords, GC_PTRFREE);
           }
           *flh = GC_obj_link(op);
           GC_aux::GC_words_recently_allocd += nwords;
           return op;
        }

Here is the call graph for this function:

template<int dummy>
static void* single_client_gc_alloc_template< dummy >::ptr_free_allocate ( size_t  n) [inline, static]

Definition at line 188 of file gc_alloc.h.

        {
           size_t nwords = GC_round_up(n);
           void ** flh;
           void * op;

           if (n > GC_max_fast_bytes) return GC_malloc_atomic(n);
           flh = GC_aobjfreelist_ptr + nwords;
           if (0 == (op = *flh)) {
              return GC_aux::GC_out_of_line_malloc(nwords, GC_PTRFREE);
           }
           *flh = GC_obj_link(op);
           GC_aux::GC_words_recently_allocd += nwords;
           return op;
        }

Here is the call graph for this function:

template<int dummy>
static void single_client_gc_alloc_template< dummy >::ptr_free_deallocate ( void p,
size_t  n 
) [inline, static]

Definition at line 213 of file new_gc_alloc.h.

       {
            size_t nwords = GC_round_up(n);
            void ** flh;
          
           if (n > GC_max_fast_bytes) {
              GC_free(p);
           } else {
              flh = GC_aobjfreelist_ptr + nwords;
              GC_obj_link(p) = *flh;
              *flh = p;
              GC_aux::GC_mem_recently_freed += nwords;
           }
       }

Here is the call graph for this function:

template<int dummy>
static void single_client_gc_alloc_template< dummy >::ptr_free_deallocate ( void p,
size_t  n 
) [inline, static]

Definition at line 219 of file gc_alloc.h.

       {
            size_t nwords = GC_round_up(n);
            void ** flh;
          
           if (n > GC_max_fast_bytes) {
              GC_free(p);
           } else {
              flh = GC_aobjfreelist_ptr + nwords;
              GC_obj_link(p) = *flh;
              *flh = p;
              GC_aux::GC_mem_recently_freed += nwords;
           }
       }

Here is the call graph for this function:


The documentation for this class was generated from the following files: