#include <GC.h>
Inheritance diagram for MMgc::GCRoot:

Public Member Functions | |
| GCRoot (GC *gc) | |
| GCRoot (GC *gc, const void *object, size_t size) | |
| virtual | ~GCRoot () |
| void * | operator new (size_t size) |
| void | operator delete (void *object) |
| const void * | Get () const |
| void | Set (const void *object, size_t size) |
| GC * | GetGC () const |
| void | Destroy () |
Private Member Functions | |
| GCRoot () | |
| void | init (GC *gc, const void *object, size_t size) |
| GCWorkItem | GetWorkItem () const |
Private Attributes | |
| GC * | gc |
| GCRoot * | next |
| GCRoot * | prev |
| const void * | object |
| size_t | size |
Friends | |
| class | GC |
Definition at line 275 of file GC.h.
|
|
|
|
|
subclassing constructor Definition at line 1371 of file GC.cpp. References MMgc::FixedMalloc::GetInstance(), and init(). 01372 { 01373 init(_gc, this, FixedMalloc::GetInstance()->Size(this)); 01374 }
|
|
||||||||||||||||
|
general constructor Definition at line 1376 of file GC.cpp. References init(). 01377 { 01378 init(_gc, _object, _size); 01379 }
|
|
|
Definition at line 1381 of file GC.cpp. References gc, and MMgc::GC::RemoveRoot().
|
|
|
if your object goes away after the GC is deleted this can be useful Definition at line 1394 of file GC.cpp. References gc, NULL, MMgc::GC::RemoveRoot(), and Set(). 01395 { 01396 Set(NULL, 0); 01397 if(gc) { 01398 gc->RemoveRoot(this); 01399 } 01400 gc = NULL; 01401 }
|
|
|
Definition at line 298 of file GC.h. 00298 { return object; }
|
|
|
|
Definition at line 315 of file GC.h. Referenced by MMgc::GC::FinishIncrementalMark().
|
|
||||||||||||||||
|
Definition at line 1355 of file GC.cpp. References MMgc::GC::AddRoot(), gc, MMgc::FixedMalloc::GetInstance(), object, size, and MMgc::FixedMalloc::Size(). Referenced by GCRoot(). 01356 { 01357 #ifndef _DEBUG 01358 // only do the memset on GCRoot subclasses 01359 if(_object == this) { 01360 size_t s = FixedMalloc::GetInstance()->Size(this); 01361 // being a GCRoot its important we are clean 01362 memset(this, 0, s); 01363 } 01364 #endif 01365 gc = _gc; 01366 object = _object; 01367 size = _size; 01368 gc->AddRoot(this); 01369 }
|
|
|
Definition at line 293 of file GC.h. References MMgc::FixedMalloc::Free(), and MMgc::FixedMalloc::GetInstance(). 00294 { 00295 FixedMalloc::GetInstance()->Free(object); 00296 }
|
|
|
Definition at line 288 of file GC.h. References MMgc::FixedMalloc::Alloc(), and MMgc::FixedMalloc::GetInstance(). 00289 { 00290 return FixedMalloc::GetInstance()->Alloc(size); 00291 }
|
|
||||||||||||
|
Definition at line 1388 of file GC.cpp. Referenced by Destroy().
|
|
|
|
|
|
Reimplemented in avmplus::AvmCore. |
|
|
Requires(gc->m_rootListLock) Definition at line 309 of file GC.h. Referenced by MMgc::GC::AddRoot(), MMgc::GC::FinishIncrementalMark(), and MMgc::GC::RemoveRoot(). |
|
|
|
|
|
Requires(gc->m_rootListLock) Definition at line 311 of file GC.h. Referenced by MMgc::GC::AddRoot(), and MMgc::GC::RemoveRoot(). |
|
|
Definition at line 313 of file GC.h. Referenced by init(), avmplus::AvmCore::initBuiltinPool(), and Set(). |
1.4.6