English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I use microsoft visual studio 6.0 in writing my code in c, and i has a problem when dynamically allocating a large size of memory, the error is access violation to memory. the answer is how can i getride of this problem

2007-04-11 00:38:12 · 5 answers · asked by mmaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1 in Computers & Internet Programming & Design

5 answers

Do u deallocate memory (i.e. use free) each time u allocate some ?

2007-04-11 00:42:20 · answer #1 · answered by vids007 2 · 1 0

The access violation error is caused when you access memory that is NOT allocated to the program. This could be caused by a null or zero pointer.

Double check your pointer allocation that it is set to point to the allocated memory.

2007-04-11 00:45:20 · answer #2 · answered by AnalProgrammer 7 · 1 0

I agree we could communicate lower back and forth to get the completed answer to a query. What if we had yet another question some answer that exchange into given, could we initiate a sparkling question? I additionally think of that a great number of folk get flagged by asserting to plenty approximately themself. For confidentiality. Sorry, I have no answer on your different question. Shhhh...stop conversing, earlier we get in trouble. jk lol

2016-12-20 11:24:01 · answer #3 · answered by ? 4 · 0 0

Check for null or bad pointers in your program.
It sounds like your program has a bug where you are trying to access a bad memory location.

2007-04-11 00:44:09 · answer #4 · answered by Balk 6 · 1 0

Post the buggy code so we can take a look.

2007-04-11 01:12:42 · answer #5 · answered by Anonymous · 1 0

fedest.com, questions and answers