Introduce MemoryPolicy API

Part 1 of #438 
If this was `null` it would be an explicit choice by the user. Reject it with an exception.