max mmap size for MAP_ANONYMOUS for amd64 ubuntu jaunty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I tried to mmap 16GB of memory (MAP_ANONYMOUS) for my program which
runs on amd64 ubuntu jaunty.  However as long as I mmap more that 8GB,
it fails with ENOMEM

if ((buf = mmap(NULL, (size_t)1024 * 1024 * 1024 * 16, PROT_READ | PROT_WRITE,
                  MAP_SHARED | MAP_ANONYMOUS, -1, 0)) == MAP_FAILED) {
    perror("mmap()");
    abort();
  }

The machine happens to have 4GB of physical memory installed

but ulimit shows no limit on max memory:

$ ulimit -a

core file size          (blocks, -c) 100000
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 38912
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 38912
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

What is the limit of MAP_ANONYMOUS?  Can we increase the limit?

Thanks!

Mark

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux