(ISTAT('MAXFREE'))
The MAXFREE parameter allows you to determine the largest free memory block within the area allocated to R:BASE. The TOTALALLOC parameter can be used to determine the total amount of dynamic memory allocated to R:BASE. MAXFREE will always be smaller than TOTALALLOC.
This will not return valid information under R:BASE for Windows.