Dear P.O.,

as this is a problem of ooRexx and not of BSF4ooRexx, I redirect further 
postings to the appropriate
oorexx-devel@lists.sourceforge.net (the ooRexx developer list).

Your problem might have to do with 
<https://sourceforge.net/p/oorexx/bugs/1450/> ("Performance drops
suddenly (once even a crash) "), which once even caused ooRexx 5.0 to crash! 
The supplied (and
submitted) crash information shows at the top of the stack trace the following 
line:

    >       rexx.dll!HashContents::entryValue(unsigned int 
position=*2105385000*) Line 282    C++

As there are approx. 40,000 objects explicitly created in this supplied test 
case (pure ooRexx and a
c++ library with external Rexx functions), the position value of 2,105,385,000 
(two billion!) seems
to have gone out of control at the point of this crash.

Bug # 1450 test case causes performance to drop dramatically while in parallel 
memory consumptions
goes up, therefore speculating that the same reason may be responsible for it.

---rony



On 01.06.2017 23:37, P.O. Jonsson wrote:
> Dear all,
>
> I have a process that is sorting a large number of items.
>
> I first have a barrel shifter to keep the „top-5“ items for each item. This 
> section uses mutable
> buffers and iterates over all items (25-30 000 lines of text) and create 
> locally sorted text lines.
>
> I then store this semi-sorted data in an array and use a = a~StableSort to 
> create a globally
> sorted data set, again involving 25-30 000 items.
>
> Most of the time this goes fine but occasionally the rexx process starts to 
> consume more and more
> memory until all memory (in my case a Mac Pro with 48 GB per CPU, 96 GB in 
> total) is used up.
> After that the processing starts to become very slow, increasing the memory 
> usage over the maximum
> for a single thread/CPU.
>
> The program is to long and messy to enclose but here is some pseudo code
>
>   Top01MB = .mutablebuffer~new
>   Top02MB = .mutablebuffer~new
>   ...
>
>   a = .array~new
>
>   DO i=1 TO CountMB.0
>     ...
>
>     DO j= 1 TO CountMB.i~Words
>
> /* Store here only the Top-5 of the Iceberg*/
>       SELECT
>         WHEN CountMB.i~Word(j) > Top01MB THEN
>         DO
>           Top05MB = Top04MB
>           Top04MB = Top03MB
>           Top03MB = Top02MB
>           Top02MB = Top01MB
>           Top01MB = CountMB.i~Word(j)
>         END
>         …
>
>     END j
>
>      a[i] = Top01MB Top02MB Top03MB Top04MB Top05MB
>
>   END i
>
>   a = a~StableSort
>
> Where should I look for memory leaks or memory bloating code? How can I check 
> where the program
> starts consuming/ not freeing memory?
>
>
>
> Hälsningar/Regards/Grüsse,
> P.O. Jonsson
> oor...@jonases.se <mailto:oor...@jonases.se>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to