1. A method comprising: responsive to a memory allocation function call to a library for allocating memory to a data structure in a multiclass memory system: identifying, at a processor of the multiclass memory system, a type of the data structure; and allocating, at the processor of the multiclass memory system and using the library, portions of the data structure among multiple memories of the multiclass memory system based on the type of the data structure.