Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: X-Code question....



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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >X-Code question.... (From: John Draper <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.