Merge from subtype branch.
[cacao.git] / src / vm / linker.cpp
index 6a6c3089d9c7913d996b8472782aeb3d5ce8d7ed..5fd4869b6598cbe249a2bcd595e35056b73adebc 100644 (file)
@@ -549,7 +549,7 @@ static int build_display_inner(classinfo *topc, classinfo *c, int i)
        {
                if (depth == DISPLAY_SIZE)
                {
-                       topc->vftbl->subtype_overflow = malloc(sizeof(void*) * (i+1));
+                       topc->vftbl->subtype_overflow = MNEW(vftbl_t *, i+1);
 #if defined(ENABLE_STATISTICS)
                        if (opt_stat)
                                count_vftbl_len += sizeof(void*) * (i+1);