GC API: Difference between revisions

543 bytes added ,  10 April 2008
Rooting...
(gc api)
(Rooting...)
Line 181: Line 181:


== Rooting ==
== Rooting ==
add root / remove root
 
typedef struct GCRoot {
  GCRoot *next; /* managed by the gc */
  GCRoot *prev; /* managed by the gc */
  GCLayout *layout;       
} gc_Root;
 
void '''gc_add_root'''(
  GCRoot *root);
 
Mark a section of memory as a GC root. The application is responsible for allocating the memory for the gc_Root structure, which may be part of a larger allocation. The gc is responsible for maintaining the next/prev linked list. The application may alter the root address, size, and conservative nature within any request.
 
void '''gc_remove_root'''(
  GCRoot *root);


== Multithreading ==
== Multithreading ==
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits