Calling a PIR method continuesly from C++ side.
Shockwave
vinfobag at gmail.com
Sun Feb 6 23:00:27 UTC 2011
Hello.
Currently, there is an issue with calling a PIR method continuously from a
C/C++ program that is meant to stay alive for a long time (>10 minutes).
The use-case is a C++ game engine which calls a C/C++ update function at
least 30 times per second. That update function calls into a PIR method of
some class previously instantiated from C++. The PIR method performs the
logic of the game, before returning to the C++ side so that the game-engine
performs the next iteration.
Currently, in order to avoid a recursion error, a CallContext PMC needs to
be create for every invocation of the PIR method from C++. Because this is
happening at least 30 times per second, it creates a lot of allocation.
Calling an empty PIR method that many times eats lots of memory. This is not
sustainable.
What is the correct way to implement this such that:
1) A recursion error doesn't happen.
2) Memory consumption remains reasonable.
Regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20110206/992fc2c5/attachment.html>
More information about the parrot-dev
mailing list