Theocacao
Leopard
Design Element
Comment on "Intro to C Pointers and Dynamic Memory"
by DRAY — May 11
Very helpful article for C newbies!

One question though... ( ...always a catch eh?)

Why is it that I get the following when freeing the "inner array mem" with

// reset
currentString = stringArray;
for...
{
free( *currentString );
currentString++;
}

*** malloc[9384]: Deallocation of a pointer not malloced: 0x2f80; 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[9384]: Deallocation of a pointer not malloced: 0x2f88; 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[9384]: Deallocation of a pointer not malloced: 0x2f8c; 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[9384]: Deallocation of a pointer not malloced: 0x2f90; 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[9384]: Deallocation of a pointer not malloced: 0x2f94; 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

thanks again for the great work!

David
Back to "Intro to C Pointers and Dynamic Memory"
Design Element

Copyright © Scott Stevenson 2004-2015