Out of memory using r.clump

I am using r.clump on a quite large file.

I get the error below.

1-band clumping with threshold 0
Pass 1 of 2…
Current region rows: 220000, cols: 240000
ERROR: G_realloc: unable to allocate 18446744065119617024 bytes of memory      at raster/r.clump/clump.c:633

Is there any way to use an option to enable some disk swap memory (similar to similar to the one on r.watershed)?
I tried to use g.gisenv set=“MEMORYMB=6000but I am not sure it made a difference. Would it help to set an higher value for MEMORYMB?

thanks
Laura

This seems to come from the reallocating the clump index. My guess is there is too large number of clumps. The nalloc variable is integer so there may be integer overflow going on. I recommend creating a bug report.
The MEMORYMB is not going to do anything.

I opened the ticket. Thanks!

there are a lot of clumps for sure. I am thinking about using some tiling system, but I am not sure how to deal with the edges.