The java buildpack for heroku uses a memory calculator, so it’s also possible that your memory settings are overridden during app start up. You should be able to inspect the actual JVM settings of the running app in heroku, but I can’t remember how from the top of my head