Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 18:55:34 +0000



Post From: Dynamic Memory

[2023-07-24 20:38:32]
WarriorTrader - Posts: 245
Had to revert everything back to how it was: sc.AllocateMemory() does not work with a map type. The study compiles but caused a CPU exception at runtime. I have to assume sc.FreeMemory does not work with map either.


The errors went away when I removed 22 stock charts I recently loaded. Will have to get more memory. My computer memory usage is close to 90% with these extra charts and SC uses over 1Gig of memory. I will assume there are plenty of people using over 1 Gig of memory with SC.


There is no documentation on sc.AllocateMemory() but there is some source code in the header file:

  void* AllocateMemory(int Size)
  {
    char* Pointer = (char*)HeapAlloc(GetProcessHeap(), 0, (SIZE_T)Size);

    if (Pointer != NULL)
      memset(Pointer, 0, Size);

    return Pointer;
  }

My guess is the function HeapAlloc or memset do not work with map, but SC Support will have to verify that.

--WT