I am running the examples provided by -spgrid- command on my Stata 16.1 MP 2-core and Windows 10:

Code:
spgrid using "Italy-OutlineCoordinates.dta",   ///
        resolution(w10) unit(kilometers)             ///
        cells("GridCells.dta")                       ///
        points("GridPoints.dta")                     ///
        replace compress dots
I get error message that says:
Code:
op. sys. refuses to provide memory
    Stata's data-storage memory manager has already allocated 57312m bytes and it just attempted to allocate another 32m bytes.  The operating
    system said no.  Perhaps you are running another memory-consuming task and the command will work later when the task completes.  Perhaps you
    are on a multiuser system that is especially busy and the command will work later when activity quiets down.  Perhaps a system administrator
    has put a limit on what you can allocate; see help memory.  Or perhaps that's all the memory your computer can allocate to Stata.
I have set memory to the maximum but the error message persists.

Does anyone know a workaround to deal with this issue?

Many thanks,

Madu