integrated check wether GMEM is exceeded or not