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

前端 未结 6 1693
眼角桃花
眼角桃花 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:19

    The answer lies in the implementation of libauto.

    As of OS X 10.6 an arena of 8 Gb is allocated for garbage collected memory on 64-bit platforms. This arena is cut in half for large allocations (>=128k) and small (<2048b) or medium (<128k) allocations.

    So in effect on 10.6 you have 4Gb of memory available for large allocations of garbage collected memory. On 10.5 the arena had a size of 32Gb, but Apple lowered that size to 8Gb on 10.6.

提交回复
热议问题