[vmkit-commits] [vmkit] r84633 - in /vmkit/trunk/lib/Mvm/MMTk: MvmGC.cpp MvmGC.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Oct 20 05:02:59 PDT 2009
Author: geoffray
Date: Tue Oct 20 07:02:58 2009
New Revision: 84633
URL: http://llvm.org/viewvc/llvm-project?rev=84633&view=rev
Log:
Fix type of postAlloc and put a default one when MMTk
is not yet compiled.
Modified:
vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp
vmkit/trunk/lib/Mvm/MMTk/MvmGC.h
Modified: vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp?rev=84633&r1=84632&r2=84633&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp (original)
+++ vmkit/trunk/lib/Mvm/MMTk/MvmGC.cpp Tue Oct 20 07:02:58 2009
@@ -43,6 +43,11 @@
return 0;
}
+extern "C" void internalPostMalloc(uintptr_t Mutator, uintptr_t ref,
+ uintptr_t typeref, int32_t bytes,
+ int32_t allocator) {
+}
+
void* Collector::begOf(gc* obj) {
if (gc::MMTkGCAllocator == internalMalloc) {
lock.acquire();
@@ -63,6 +68,7 @@
void Collector::initialise() {
if (!gc::MMTkGCAllocator) {
gc::MMTkGCAllocator = internalMalloc;
+ gc::MMTkGCPostAllocator = internalPostMalloc;
gc::MMTkCheckAllocator = internalCheckAllocator;
MutatorThread::MMTkMutatorSize = 0;
MutatorThread::MMTkCollectorSize = 0;
Modified: vmkit/trunk/lib/Mvm/MMTk/MvmGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/MMTk/MvmGC.h?rev=84633&r1=84632&r2=84633&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/MMTk/MvmGC.h (original)
+++ vmkit/trunk/lib/Mvm/MMTk/MvmGC.h Tue Oct 20 07:02:58 2009
@@ -47,9 +47,9 @@
int32_t offset, int32_t allocator,
int32_t site);
- typedef gc* (*MMTkPostAllocType)(uintptr_t Mutator, uintptr_t ref,
- uintptr_t typeref, int32_t bytes,
- int32_t allocator);
+ typedef void (*MMTkPostAllocType)(uintptr_t Mutator, uintptr_t ref,
+ uintptr_t typeref, int32_t bytes,
+ int32_t allocator);
typedef int (*MMTkCheckAllocatorType)(uintptr_t Mutator, int32_t bytes,
int32_t align, int32_t allocator);
More information about the vmkit-commits
mailing list