J
Joe Joe
I write my C program in Visual C.
After a malloc, I loop for 100 times and amend the memory contents
which I have malloced (but I have never change the ptr or its
address).
After that I free the memory space.
The problem is that memory access error happens OS-dependently when I
free the memory space.
When I run the exe in DOS-prompt of Win2000 and NT memory access error
happens.
But when I run it in Visual C debug mode and XP, there is no error.
Does anyone have the same experience before when freeing the memory?
Thank you.
After a malloc, I loop for 100 times and amend the memory contents
which I have malloced (but I have never change the ptr or its
address).
After that I free the memory space.
The problem is that memory access error happens OS-dependently when I
free the memory space.
When I run the exe in DOS-prompt of Win2000 and NT memory access error
happens.
But when I run it in Visual C debug mode and XP, there is no error.
Does anyone have the same experience before when freeing the memory?
Thank you.