[Qt-interest] QScriptEngine: "Could not allocate register file: 12"
Thiago Macieira
thiago at kde.org
Thu May 6 10:33:24 CEST 2010
Em Quinta-feira 06 Maio 2010, às 09:56:30, Pedro Santos escreveu:
> Am 05.05.2010 23:00, schrieb Frank Mertens:
> > When I remember right the script engine is doing some memory mapping
> > for its "register file". So, my guess is, you are running out of address
> > space for memory mapping. The question is of course, why you need
> > hundreds of script engines running at the same time. If you really need
> > this maybe you check the compiler flags for the Qt libs. There is a flag
> > to disable the JIT and maybe it takes less resource that way.
>
> I don't really need that many script engines. But I would like to
> understand what this error means. Thank you for the hint with the JIT, I
> will try it out and see what happens.
Grep the Qt sources for that string and find out where the 12 comes from.
They all come from
src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h, like
this:
m_buffer = reinterpret_cast<Register*>(mmap(0, bufferLength, PROT_READ|
PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY,
0));
if (m_buffer == MAP_FAILED) {
#if OS(WINCE)
fprintf(stderr, "Could not allocate register file: %d\n",
GetLastError());
#else
fprintf(stderr, "Could not allocate register file: %d\n", errno);
#endif
CRASH();
}
And as someone suspected, 12 is the errno and on Linux:
#define ENOMEM 12 /* Out of memory */
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100506/660b279a/attachment.bin
More information about the Qt-interest-old
mailing list