Added GetMemoryRegions function