framework for function/cap mmap