Getting the size of the call stack
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Getting the size of the call stack
- From: "Soni L." <fakedme@...>
- Date: 2016年10月24日 19:47:12 -0200
How can I get the size of the call stack in O(logn) time? It doesn't
seem that Lua has an O(1) way to do it as it currently stands, and I
need it for virtualization. O(logn) is the closest I can get. (assuming
getinfo doesn't take O(n) time to access a stack index...)
I mean do I just call getinfo with an increasing index and stuff?
(So much for having absolute stack indices... Why can't I use negative
indices again? And get the length in O(1) time? Guess that's just not
often needed or something?)
--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.