[vmkit-commits] [vmkit] r84639 - /vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Oct 20 09:07:33 PDT 2009
Author: geoffray
Date: Tue Oct 20 11:07:31 2009
New Revision: 84639
URL: http://llvm.org/viewvc/llvm-project?rev=84639&view=rev
Log:
Allocate arrays with malloc on boot.
Modified:
vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=84639&r1=84638&r2=84639&view=diff
==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Tue Oct 20 11:07:31 2009
@@ -761,7 +761,8 @@
ZipFile* file = archive.getFile(PATH_MANIFEST);
if (file) {
UserClassArray* array = vm->bootstrapLoader->upcalls->ArrayOfByte;
- ArrayUInt8* res = (ArrayUInt8*)array->doNew(file->ucsize, vm);
+ ArrayUInt8* res = (ArrayUInt8*)array->doNew(file->ucsize, vm->allocator,
+ true);
int ok = archive.readFile(res, file);
if (ok) {
char* mainClass = findInformation(vm, res, MAIN_CLASS,
@@ -777,6 +778,7 @@
} else {
printf("Can't extract Manifest file from archive %s\n", jarFile);
}
+ free(res);
} else {
printf("Can't find Manifest file in archive %s\n", jarFile);
}
More information about the vmkit-commits
mailing list