How can a moderately sized memory allocation fail in a 64 bit process on Mac OS X?

前端 未结 6 1735
眼角桃花
眼角桃花 2021-01-02 01:30

I\'m building a photo book layout application. The application frequently decompresses JPEG images into in-memory bitmap buffers. The size of the images is constrained to 10

6条回答
  •  無奈伤痛
    2021-01-02 02:05

    Another guess, but it may be that your colleague's machine is configured with a stricter maximum memory per user process setting. To check, type

    ulimit -a

    Into a console. For me, I get:

    ~ iainmcgin$ ulimit -a
    core file size          (blocks, -c) 0
    data seg size           (kbytes, -d) unlimited
    file size               (blocks, -f) unlimited
    max locked memory       (kbytes, -l) unlimited
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 256
    pipe size            (512 bytes, -p) 1
    stack size              (kbytes, -s) 8192
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 266
    virtual memory          (kbytes, -v) unlimited
    

    From my settings above, it seems there is no per-process limit on memory usage. This may not be the case for your colleague, for some reason.

    I'm using Snow Leopard:

    ~ iainmcgin$ uname -rs
    Darwin 10.6.0
    

提交回复
热议问题