Add support for memory limits