mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix PowerPC and ARM bootimage builds
This requires reducing HeapCapacity and CodeCapacity back to 128MB and 30MB respectively. I had set them to larger values to test non-ProGuard'ed OpenJDK bootimage builds, which naturally needed a lot more space. However, such builds aren't really useful in the real world, and the compiler currently can't handle jumps or calls spanning more than the maximum size of an immediate branch offset on ARM or PowerPC, so I'm lowering them back down to more realistic values.
This commit is contained in:
parent
45a2469672
commit
ab3929d411
@ -23,7 +23,7 @@ using namespace vm;
|
||||
|
||||
namespace {
|
||||
|
||||
const unsigned HeapCapacity = 768 * 1024 * 1024;
|
||||
const unsigned HeapCapacity = 128 * 1024 * 1024;
|
||||
|
||||
// Notes on immutable references in the heap image:
|
||||
//
|
||||
@ -560,9 +560,15 @@ main(int ac, const char** av)
|
||||
Finder* f = makeFinder(s, h, av[1], 0);
|
||||
Processor* p = makeProcessor(s, h, false);
|
||||
|
||||
BootImage image;
|
||||
const unsigned CodeCapacity = 128 * 1024 * 1024;
|
||||
// todo: currently, the compiler cannot compile code with jumps or
|
||||
// calls spanning more than the maximum size of an immediate value
|
||||
// in a branch instruction for the target architecture (~32MB on
|
||||
// PowerPC and ARM). When that limitation is removed, we'll be able
|
||||
// to specify a capacity as large as we like here:
|
||||
const unsigned CodeCapacity = 30 * 1024 * 1024;
|
||||
|
||||
uint8_t* code = static_cast<uint8_t*>(h->allocate(CodeCapacity));
|
||||
BootImage image;
|
||||
p->initialize(&image, code, CodeCapacity);
|
||||
|
||||
Machine* m = new (h->allocate(sizeof(Machine))) Machine
|
||||
|
Loading…
Reference in New Issue
Block a user