QScriptEngine memory usage
Hi,
I’ve been playing around with QScriptEngine and I noticed it seems to use a lot of memory, on my platform (ARMv5 linux) the first QScriptEngine object instanciated allocates a 11540 KB memory block, and the next engines allocate a 2592 KB memory block each. (shown by pmap’s output)
This behavior doesn’t seem odd to me, but I am wondering :
- can those buffers be tweaked in QT’s source code ?
- what is the purpose of such huge buffers ?
Thank you very much !
3 replies
Tracking down the source of the memory usage, I could notice the first QScriptEngine creates a thread (enabled by the USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY option), this thread allocates 8MB on my system for its stack.
This thread seems to be shared between all script engines, that’s why there is a difference between the first script engine and the others.
Still trying to optimize the memory size for each script engine (seems like the interpreter maps a 2M memory block)
You must log in to post a reply. Not a member yet? Register here!
