As the dream of college remains unaffordable for many students and leaves others in mountains of debt, a growing number of private-college presidents are taking home more than $1 million a year.

A record 42 private college presidents saw their earnings top $1 million in 2011, according to a report released Sunday by the Chronicle of Higher Education. This is up from 36 presidents whose compensation topped $1 million in 2010. The data is based on the most recent tax filings available from the 500 private colleges with the biggest endowments.

The median total compensation, which includes salary, deferred compensation and other one-time payments, came in at $410,523, which is up 3.2% from 2010.

Related: Average student loan debt tops $29,000

University of Chicago president Robert Zimmer was the highest-paid president -- raking in $3.4 million. His base salary was $918,00, but much of his pay package came from deferred compensation.

Deferred compensation is tax-deferred money set aside until a specified date, and a growing number of universities use these packages to retain top talent.

Coming in at Number 2 was Joseph Aoun of Northeastern University, who was granted a $2 million retirement benefit that won't be disbursed until he leaves the university. Excluding that money, his compensation was a little more than $1 million.

Dennis Murray, who has been president of Marist College for 35 years, was third on the list. The majority of his compensation came from a one-time payment of $2 million from a deferred retirement plan that had been set up in 2001. It was supposed to come due the year he retired, which he had expected to be 2011. But he decided not to leave, so he received that money while still president.

Related: Homeless college students seek shelter during breaks

Other presidents in the highest-paid club include Lee Bollinger of Columbia University, who helped the school avoid budget cuts with the most successful fundraising campaign in its history; and former Tufts president Lawrence Bacow, whose compensation included a one-time lump-sum payment of $1.7 million upon his departure.

Among public schools, only four presidents earned compensation exceeding $1 million in 2012. Graham Spanier, the former head of Pennsylvania State University, topped the list at $2.9 million. The median pay packages of public school presidents are slightly higher than private schools, at $441,392.

These multimillion-dollar presidential pay packages continue to be doled out despite how unaffordable college has become for many Americans. Student loan debt now exceeds $1 trillion, and the average college graduate owes more than $29,000 in student loans.