Note that there are some explanatory texts on larger screens.

plurals
  1. POAnyone use CFAllocatorSetDefault succesfully in an iPhone app?
    primarykey
    data
    text
    <p>I wish to replace the default <code>CFAllocator</code> in my iPhone app with my own implementation. I want to control the memory allocated by the <code>UIWebView</code> since it seems to hold on to so much memory after loading a website and that memory still lingers around when the <code>UIWebView</code> is released.</p> <p>After I call <code>CFAllocatorSetDefault</code> I get an <code>EXC_BREAKPOINT</code> exception when the next allocation occurs.</p> <p>The exception seems to happen inside of a call to <code>CFRetain</code> (done in the simulator but the same thing happens on a device):</p> <pre><code>CoreFoundation`CFRetain: 0x1c089b0: pushl %ebp 0x1c089b1: movl %esp, %ebp 0x1c089b3: pushl %edi 0x1c089b4: pushl %esi 0x1c089b5: subl $16, %esp 0x1c089b8: calll 0x1c089bd ; CFRetain + 13 0x1c089bd: popl %edi 0x1c089be: movl 8(%ebp), %esi 0x1c089c1: testl %esi, %esi 0x1c089c3: jne 0x1c089db ; CFRetain + 43 0x1c089c5: int3 0x1c089c6: calll 0x1d66a00 ; symbol stub for: getpid &lt;- EXC_BREAKPOINT (code=EXC_I386_BPT subcode=0x0) 0x1c089cb: movl %eax, (%esp) 0x1c089ce: movl $9, 4(%esp) 0x1c089d6: calll 0x1d66a4e ; symbol stub for: kill 0x1c089db: movl (%esi), %eax 0x1c089dd: testl %eax, %eax 0x1c089df: je 0x1c08a17 ; CFRetain + 103 0x1c089e1: cmpl 1838519(%edi), %eax 0x1c089e7: je 0x1c08a17 ; CFRetain + 103 0x1c089e9: movl 4(%esi), %ecx 0x1c089ec: shrl $8, %ecx 0x1c089ef: andl $1023, %ecx 0x1c089f5: cmpl 1834423(%edi,%ecx,4), %eax 0x1c089fc: je 0x1c08a17 ; CFRetain + 103 0x1c089fe: movl 1766575(%edi), %eax 0x1c08a04: movl %eax, 4(%esp) 0x1c08a08: movl %esi, (%esp) 0x1c08a0b: calll 0x1d665c8 ; symbol stub for: objc_msgSend </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload