Help with malloc/free:
Help with malloc/free:
- Subject: Help with malloc/free:
- From: Travis Rose <email@hidden>
- Date: Tue, 10 Apr 2007 18:50:37 -0400
Hello all,
I've noticed something strange with malloc and free on Mac OS X.
I have a recursive function that does compression.
In this function, as the data are compressed, I wish to release some previously allocated memory;
For example,
int* decompress = myTableStart[block_number]; //get the pointer to the block
... do compression ...
free(decompress); //free the block <-- this is not having any effect!!!
For some reason, the memory is not freed immediately, so it behaves like a leak ... and the program eventually crashes.
Any ideas on how to fix this?
Sincerely,
Travis
P.S. The same code works on linux
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden