[lkml]   [2000]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectCan a process use up more than 910MB?

    Hi all,

    After reading/searching through this mailing list, I got the feeling a
    process could use up to 3GB of virtual memory per default.

    Since we really need this (We run commercial simulation tools like
    ModelSim that uses up to 1.5GB today)

    So, we write a small program (included below) to test this. The machine
    had 1GB of physical memory and a a 2GB swap device. After each megabyte of
    allocated memory the program prints the current allocated memory. Once no
    more memory can be allocated, it sleeps for a while (long enough to check
    the result with top) and then exits.

    It turned out that a 2.1.12 kernel compiled for 1GB of physical memory
    only allowed the process to allocate 910MB! Can anyone comment on this? I
    believed it would be possible to use more... I also run two of these
    processes in parallel, and then both got exactly the same amount, 910MB...

    Thanks for everything.



    #include <string.h>
    #include <stdlib.h>

    main() {
    int i;
    void *x;
    x = (void *)4;
    for(i=0;x!=NULL;i++) {
    x = malloc(1024);
    if(x!=NULL) {
    if(i%1000)==0) {
    printf("malloc %d\n",i/1000);

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:55    [W:0.021 / U:8.056 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site