aboutsummaryrefslogtreecommitdiffstats
path: root/ftrunctest.c
blob: dfa58b38df7df5dc7f8d9e013ffa78661f2c05bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <string.h>

int main(int argc, char *argv[])
{
  int fd;
  char *mapping;

  fd = open("ftrunc.dat", O_RDWR|O_CREAT, 0666);
  ftruncate(fd, 1024*1024*1024);
  close(fd);

  return 0;
}