There was a little bug into RAM setting, using C libraries is always better...