vm_allocate errors

  • i'm getting an error which I'm sure is caused by my poor grasp of
    memory management techniques.

    I believe a '[NSData mutableCopy]' call is failing giving the following
    error:
    *** malloc: vm_allocate(size=17367040) failed (error code=3)
    and
    <NSInvalidArgumentException> *** NSCopyMemoryPages(0xfe31d000, 0x0,
    13889536)

    I'm assuming it's the second argument which is invalid here. These
    errors always have a second argument od 0x0.

    the application processes audio files and runs happily for a couple of
    hundred files at a time. once it gets to around 400 files (more likely
    a total file size) it throws the error.

    I am looping thru the files in a second thread with the autorelease
    pool correctly allocated but I'm wondering if the pool is 'filling up'
    (running out of memory) before it gets released at the end of my
    function.
    I tried the same routine without detaching to a second thread but the
    result was the same.

    I've tried moving my larger objects to manually alloc/init/release but
    saw no change.
    I know I'm leaking but just can't see where.

    any ideas?
  • On Apr 4, 2005, at 2:07 PM, justin webster wrote:

    > any ideas?

    Understand what is going wrong using...

    /Developer/Applications/Performance Tools/ObjectAlloc and/or MallocDebug

    ...or any similar tool (man leaks).

    -Shawn
previous month april 2005 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today
MindNode
MindNode offered a free license !