Re: malloc_error_break

2010-10-21 Thread koko
On Oct 21, 2010, at 2:48 PM, David Duncan wrote: On Oct 21, 2010, at 1:44 PM, k...@highrolls.net wrote: Not a Cocoa topic but I am thinking the smart guys here can show me the error of my ways. I do this: BYTE *destination = (BYTE*)malloc(size); ... do stuff free(destination); The fre

Re: malloc_error_break

2010-10-21 Thread David Duncan
On Oct 21, 2010, at 1:44 PM, k...@highrolls.net wrote: > Not a Cocoa topic but I am thinking the smart guys here can show me the error > of my ways. > > I do this: > > BYTE *destination = (BYTE*)malloc(size); > > ... do stuff > > free(destination); > > The free() gives this error > > mallo

malloc_error_break

2010-10-21 Thread koko
Not a Cocoa topic but I am thinking the smart guys here can show me the error of my ways. I do this: BYTE *destination = (BYTE*)malloc(size); ... do stuff free(destination); The free() gives this error malloc: *** error for object 0x21568580: Non-aligned pointer being freed (2) How can