diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-06 15:36:07 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-06 15:36:07 -0400 |
commit | c00e89fc893092ef2efb74939efd2282dcbe6e92 (patch) | |
tree | 456979905f8accfded1a832cedfe4d9a8f2d6732 | |
parent | e616da1f87a23afe1f154dfddc0e2682d2c2835d (diff) |
Add close()
-rw-r--r-- | bin/mttest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/mttest.c b/bin/mttest.c index e2813e6..3f1f655 100644 --- a/bin/mttest.c +++ b/bin/mttest.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <sys/mman.h> | 16 | #include <sys/mman.h> |
17 | #include <sys/stat.h> | 17 | #include <sys/stat.h> |
18 | #include <fcntl.h> | 18 | #include <fcntl.h> |
19 | #include <unistd.h> | ||
19 | /* Include gettid() */ | 20 | /* Include gettid() */ |
20 | #include <sys/types.h> | 21 | #include <sys/types.h> |
21 | 22 | ||
@@ -106,6 +107,7 @@ int main(int argc, char** argv) | |||
106 | printf("mmap failed.\n"); | 107 | printf("mmap failed.\n"); |
107 | return -1; | 108 | return -1; |
108 | } | 109 | } |
110 | close(fd); | ||
109 | 111 | ||
110 | mlockall(MCL_CURRENT | MCL_FUTURE); | 112 | mlockall(MCL_CURRENT | MCL_FUTURE); |
111 | /***** | 113 | /***** |