Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 22:43:31 +0000



[Programming Help] - System Crashing because of dynamic memory in Custom study

View Count: 473

[2020-09-22 06:53:11]
User255315 - Posts: 127
Hi SC,
I do not mean to imply that i have any issue with Sierra software or the bugs im facing are caused because of Sierra software, I just want to understand the best practices while using some of the advanced features of SC.

I use a few dynamic memory allocations for my Custom studies in SC and also use more than 4-5 charts in a particular chartbook. I noticed recently that if I'm running sims over continuous contracts for such a set-up, my system crashes after a certain number of sims. Now I went through your extensive documentation on this particular effect of custom studies and as far as i understand it the problem may be arising out of a few cases:

1. The custom study code i have written maybe inefficient to tackle the number of charts or the data referencing i am doing in the chartbook. A specific issue that i think might be the cause, is FREEING OF DYNAMIC MEMORY ALLOCATED in the custom study. When i read sierra's documentation i remember reading that sierra releases all memory before exiting etc, but I want to ask again, do i have to free memory that i allocate inside the custom study myself or will sierra do it for me? Can the issue im describing above be caused because of not clearing the memory from my side?

2. The number of charts i'm using is using up too much cpu memory, which might be probable since i have two three instances running sims at the same time with 4-5 charts in a chartbook as i said. In this case since I am using windows 10, your documentation suggests skipping the scid files from malware check. Is there anything else that might help me detect if the number of charts is causing the problem?

3. The third possibility might be the updated windows video/display drivers incompatibility with Sierra, or actual hardware issues. But i want to make sure its not any of the first two before checking that.

Any help you could give regarding this will be appreciated.
[2020-09-22 10:52:34]
Sierra Chart Engineering - Posts: 104368
Do you mean your computer system runs into a problem?

1.
do i have to free memory that i allocate inside the custom study myself or will sierra do it for me?
How did you allocate the memory?


2. Just if the CPU usage is high for the Sierra Chart process and Sierra Chart is not responsive.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-09-22 10:52:57
[2020-09-22 18:40:23]
User255315 - Posts: 127
I have allocated memory using the sc.AllocateMemory
[2020-09-23 05:14:13]
Sierra Chart Engineering - Posts: 104368
You must absolutely release the memory. Sierra Chart will not do that automatically. And you will have problems, if the DLL is ever unloaded like if you were to rebuild the DLL if you do not release the memory first.


More information:
sc.AllocateMemory()
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-09-23 05:27:16

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account