Add custom allocator for precise marking and add more tools

* CustomAllocator : Supports precise marking for specified objects.
                    (also supports iteration of specific typed objects)
* HeapVisualizer : Track and visualize heap usage info.
* GCLeakChecker : Shows where the false reference came from.
                  (Developer should specify the location of false reference)
* Add support for incremental build of bdwgc
This commit is contained in:
Eunji Jeong 2016-12-16 17:14:01 +09:00
commit 1a56fe4e48
22 changed files with 1056 additions and 475 deletions

View file

@ -90,4 +90,15 @@ void ArrayObject::sort(ExecutionState& state, std::function<bool(const Value& a,
}
Object::sort(state, comp);
}
void* ArrayObject::operator new(size_t size)
{
return CustomAllocator<ArrayObject>().allocate(1);
}
void ArrayObject::iterateArrays(ExecutionState& state, HeapObjectIteratorCallback callback)
{
iterateSpecificKindOfObject(state, HeapObjectKind::ArrayObjectKind, callback);
}
}