You could keep track of memory, but why not increase size of process first.
Additionally, you could get stack memory and meory data. Call it before
exit get memory stats. You housl now have a ballpark of how much emory each
call takes. You can then perhaps use a counter.
Regards
Chuck
On Thu, No
Chip
I have some recursion stuff I do, sometimes it hit a bad data set that caused
an infinite loop. What I have done is, created a process variable that gets
incremented at the top of the recursion process and decrements at the end. I
then put a check in my code to see if I'm more than say 3
Chuck,
The recursion issue is a data related issue.
When the data is good, tested and running for years, there is no memory
issue, and no crashing.
It is the bad data which is causing the issue.
-- I created a relative relationship where an animal was it's own
parent... this is/was the data probl
In such cases I use a longint parameter "level" to the recursive method. On
first run this parameter is set to 1 and is incremented with every level of
recursion. I then test for an arbitrary "level" (e.g. 1000) and abort the
further recursion.
HTH
Ingo Wolf
4d_tech-requ...@lists.4d.com schri
Thanks
I actually have this in place due to the fact that the initial call is
for one parent (i.e maternal or paternal lineage), and subsequent
(recursive) calls are for both parents; however I am reluctant to use
the level limit as I do not know what a 'real' limit is. With a
breeding colony
5 matches
Mail list logo