[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Function Surprise revisited



PureBytes Links

Trading Reference Links


I had previously posted this...

>  Taking a function that was defined inside the individual system files,
>I decided to remove the definition from the system files and define it in a
>function file in order to create additional space within the system files.
>  To my surprise, the exercise produced results opposite to my
>intentions.
>  The system file is now out of memory when I verify even though there is
>less actual code in the file.
>  The function returns a numeric value and the properties are set to series.
>the variable is referred to dozens of times within the system file.
>  What gives???

Bill replied with this...

<<<
Upon verification, all functions are compiled into the piece of code that
forms the system or indicator.  Placing code in a function will not help
avoid the EXE code too large problem.
>>>

I then replied....

<<<<
  Not only did it not help but it, indeed, increased the memory usage
in this case.
>>>>

  I scrapped plans to separate all but one function general to the system
code but I did separate one into separate function code for the sake of
convenience.
  Since the initial separation, I have made the function code much more
elaborate and thus the function code is much larger than at the time of
it's initial separation from the system files. So large, in fact, that I see
no way that I could possibly re-introduce it into the system files without
blowing out the 64k limit in the system files.
  This brings up my question.....

Could it be that when a function is initially separated from system code 
and placed into a function file and verifying both is successful, that TS
initially establishes a function code buffer to the system file that is larger
than the space the same code would require if left in the system file and
that once this is established, the size of the function can then be increased
to any size within 64k without increasing the amount of space required by
the system file to digest the function?

dbs