@jazbaatbadalgaye I think the clue is in this line you posted above:
dm->bin[index]++;
assuming "dm" above is a DriveMovement object, that means the "bin" array is also defined within the DriveMovement class. RRF creates a whole pool of DM objects initially, and looking at Move.h, this is going to be 83 or 125 depending on which board you are using.
So on a duet2, with a "bin" array size of 40, this would end up requiring an additional 13,280 bytes