Flexible application-directed virtual memory management for data-intensive applications and heterogeneous hardware