CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2018

    GCC and heap size

    I thought to write C program and I ask my self what is the limit of heap with gcc 4.9.2 (Debian 8) because I have to use this version for educational reason in university school.
    How much can I use Heap ? What's the default size ? I cannot change it.

  2. #2
    Join Date
    Nov 2018

    Re: GCC and heap size

    At your shell prompt, type
    $ ulimit -a
    real-time non-blocking time  (microseconds, -R) unlimited
    core file size              (blocks, -c) 0
    data seg size               (kbytes, -d) unlimited
    scheduling priority                 (-e) 0
    file size                   (blocks, -f) unlimited
    pending signals                     (-i) 63267
    max locked memory           (kbytes, -l) 2034520
    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) 63267
    virtual memory              (kbytes, -v) unlimited
    file locks                          (-x) unlimited
    The amount of heap you can allocate is limited by data seg size and virtual memory size.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width