FastMM5 icon indicating copy to clipboard operation
FastMM5 copied to clipboard

Please add posibility to configure value of stack trace depth in runtime

Open jaclas opened this issue 5 years ago • 3 comments

Please add posibility to configure value of stack trace depth in runtime, by replacing constant CFastMM_StackTraceEntryCount with a variable (or setter procedure).

jaclas avatar Jun 08 '20 14:06 jaclas

On the Praxis forum you said that nobody needs a long call stack, that in practice a shorter one is enough. Here's an example from life, I use FastMM4, I have a modified source and the call stack is set to 25 items, but still it's not enough:

vps_2020 07 23_01

jaclas avatar Jul 23 '20 10:07 jaclas

Hi Jaclas,

On the Praxis forum you said that nobody needs a long call stack, that in practice a shorter one is enough.

I didn't put it in such strong terms, but anyhow, making the stack trace depth configurable runtime is on the to-do list. It is not a trivial change, so I can't make any promises.

Best regards, Pierre

pleriche avatar Jul 23 '20 10:07 pleriche

Hi Jaclas,

I have added support for configuring the depth of the allocation and free stack traces runtime. The minimum value is 0 (if you're tight on memory or you only need the other debug funtionality) and the maximum 64. The current default is 20.

The new calls are FastMM_SetDebugModeStackTraceEntryCount and FastMM_GetDebugModeStackTraceEntryCount.

Best regards, Pierre

pleriche avatar Aug 30 '20 10:08 pleriche