Expressing the type of mmap() system call in ATS

Post date: Mar 17, 2009 8:04:40 PM

The POSIX standard specifies a mmap() system call that allows programs to request memory pages to be mapped into the current process address space. The memory pages could be backed by system's swap file or an arbitrary disk file, and the programmer specifies such intent by passing integer bit flags. Integer bit flag is a common way in the C language to pass a set of options to a function. A bit's zero and one value indicates membership of the option represented by the bit. In the case of mmap(), the prescence and absence of certain bit flags changes theresource requirement: if you want to map a disk file, then you need to give a valid file descriptor; otherwise you don't need a file descriptor. In this talk, I will show how to express bit flags in ATS in a way that will make the type checker aware of appropriate resource requirements indicated by the flag.

Date: Mar 18, 2009

Speaker: Likai Liu

Slides: attached below.