Global Memory

Estam

Member
Sep 27, 2007
81
2
71
I need help understanding what "Global Memory" is. I have a data collecting program and half way through the day get message saying I'm out of Global memory and references 1045.
Can anyone point me in the right direction. Many thanks...
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Could be any of:
1. Virtual memory (likely, running XP in 3GB RAM)
2. Physical memory (system RAM, likely, running XP in 3GB RAM)
3. Drive space (unlikely, plus it would be obvious).
4. An application-specific error unrelated to the above, like if it uses MySQL, and is passing you its error (1045 is a common MySQL generic error).

Are you using recursive functions?
 

Estam

Member
Sep 27, 2007
81
2
71
Thank you for your response. I am using a product called TradeStation 2000i, it's over 10 years old and have used this continually with out a problem. There must be something that has change but can't figure what. Today after 8 hrs the message reads...(Title) TradeStation 2000i Omega Research (Message) Out of Global Memory during FReAllocD 1045.

To answer your question, I'm not sure if I am using Recursive Functions!

I emailed this company I Get market data from and they have no memory issues with there program and do not use SQL.
 
Last edited:

Estam

Member
Sep 27, 2007
81
2
71
The computer is coming up with this "Out of Global memory" message and refers to this "FreAllocD at 1045".
This must be referenced somewhere in my computer maybe in a eg. dll file so my question is there any program that will analyze files on the computer to go look where this is referenced. This could give me an idea of where to start looking to find out what it's talking about.
Many thanks... Dave
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
There are many programs to help you find the file referencing that symbol, but will do you no good. Freallocd is not a standard/common function, TMK, and not one a search turns up anything for, but is surely just a customized implementation of a realloc. It's new to me, but apparently frealloc is a name of a realloc optimized for key-value lists, and seems to supported by Oracle, a hodge-podge of BI software suites, and some compilers. I'm 99% sure that you will not find anything useful by locating it in some files.

Realloc (re-allocate) functions allocate a new block of memory, copy the old block's data into it, then return the location of the new block. If it cannot allocate the new memory, it will fail. I think it's a safe assumption that this freallocd is working as designed. Your problem is surely one of these:
1. Running into address space fragmentation problems (nothing you can fix, except by restarting the program, most likely)
2. Running into address space size limits (2GB, minus some overhead, for 32-bit programs)
3. Running into physical memory limits (exceedingly unlikely, and you would have a lot of page file thrashing, losing hours of work in the process--yes, even with an SSD--were this the case).

As old as it is, it's probably 32-bit, and you probably are starting to run out of memory during some data processing task. When I first replied, I did a bit of Google searching, and found the use of recursive functions weren't uncommon with the program, and did sometimes cause issues with running out of memory. Changing the code your specific use case runs, to do work in smaller chunks, or migrating to different software, are likely your only practical options.
 

Estam

Member
Sep 27, 2007
81
2
71
Many thanks for your time on this. I think the end of your last post hit the nail on the head, and will clean up the program as I may have added a few extra extra tasks over the last year or so can start refining them. Anyway I really appreciated your help with this. Regards......