This is a note I wrote some time ago about VO 2.5 and there is an addition there about the then new VO 2.7
Visual Objects applications operate within a fixed amount of memory. If you do not have enough the applications tend to die in horrible and unusual ways. To up the amount the application has you can use either of two methods. One is to call
DynSize in the application and get yourself some more memory or the second is to set a registry key to make the application load with more at startup.
The key you need is
HKEY_CURRENT_USER\Software\ComputerAssociates\CA-Visual Objects Applications\Runtime
The Value you wish to look at is
MaxDynSpace. You may need to create this value, if you do create it as a Dword key. Entering the value in hex is by far the easiest approach. The default value usually used is
1000000 which is 16 Mb. A value of
2000000 (32 Mb) is a reasonable alternative to give your app a better chance.
This value is read by the running application, not at compile time for a default setting so if you have discovered that your application will always need at least x amount of memory use the
DynSize call to ensure it will run properly on your machine. The registry key is particularly useful if you are running a 3rd party application.
There is a bug in the VO 2.5 implementation of the DynSize call. The DynSize call is intended to allocate a block of memory to start with to prevent page faults early on. If you use more than this amount of pages however when the garbage collector kicks in it will reduce the number of pages down to the number specified by the DynSize, thereby losing the extra pages allocated and anything in them. This commonly causes crashes. The simplest workaround is to set the DynSize to be so high you don’t reach it. Alternatively upgrade to VO 2.7 where the bug has been fixed.