To cram is exactly what you expressed, Mateus. As the word suggest it is "amontoar".
A last minute cramming, the eleventh-minute cramming would be trying to retain a lot of subjects the night before the exam or on the very day of it.
That´s why many people associate "cramming" the last dish effort to review and retain study topics, with the last dish effort at the eleventh hour.
As a matter of fact, the word "cram/cramming" generally comes along with expressios like "cram before an exam" or "last minute cramming" etc.
Cramming doesn´t have to mean always something at the last minute. Let´s say one have to study something and it has a massive body of knowledge, say a flight course or something like that, so the student have to cram a book on flight subjects (memorize a "brick of a book" on flight subjects.)