Re: X-Code question....
Re: X-Code question....
- Subject: Re: X-Code question....
- From: Eric Albert <email@hidden>
- Date: Wed, 30 Nov 2005 20:57:08 -0800
On Nov 30, 2005, at 8:52 PM, John Draper wrote:
On X-Code 1.5, when in the source debugger, then press "Restart" to
restart the program again, what happens to allocated space? Is the
program's allocated space freed before it actually starts, or will
allocated space stick around.
An application always gets new pages of memory when it starts.
From within my thread, I'm calling some socket calls like so...
int nTimeOut = 5000; // 5s Time out
setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, (char*)&nTimeOut,
sizeof(nTimeOut));
But right after stepping past this, the gdb window displays...
*** malloc[2193]: Deallocation of a pointer not malloced: 0x38000000;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see
tools to help debug
*** malloc[2193]: Deallocation of a pointer not malloced: 0x48000010;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see
tools to help debug
*** malloc[2193]: Deallocation of a pointer not malloced: 0x805e0178;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see
tools to help debug
I get about 500 of these lines.... Is there something within
setsockopt that is causing this,
or is something else the culprit?
I'd guess that something's running in the other threads of your
application while you're stepping which does this. Try breaking on
malloc_printf. The backtrace should point you to the source of the
problem.
Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden