00001 #line 1508 "./lpsrc/flx_gc.pak"
00002 #ifndef __FLX_TS_COLLECTOR_H__
00003 #define __FLX_TS_COLLECTOR_H__
00004 #include "flx_collector.hpp"
00005 #include "pthread_mutex.hpp"
00006
00007 namespace flx {
00008 namespace gc {
00009 namespace collector {
00010
00011
00012 struct PTHREAD_EXTERN flx_ts_collector_t :
00013 public flx::gc::collector::flx_collector_t
00014 {
00015 flx_ts_collector_t(allocator_t *);
00016 ~flx_ts_collector_t();
00017
00018 private:
00019
00020 void *v_allocate(gc_shape_t *ptr_map, unsigned long);
00021 void v_deallocate(frame_t *frame);
00022
00023
00024 unsigned long v_collect();
00025
00026
00027 void v_add_root(void *memory);
00028 void v_remove_root(void *memory);
00029
00030
00031 void v_check();
00032
00033 unsigned long v_get_allocation_count()const;
00034 unsigned long v_get_root_count()const;
00035 unsigned long v_get_allocation_amt()const;
00036
00037 void v_compact(bool closed);
00038
00039 private:
00040 mutable flx::pthread::flx_mutex_t mut;
00041 };
00042
00043 }}}
00044 #endif
00045