Alexander Yin
Junior Member level 2
hi everybody,
I'm using the list template as a channel between a master and a slave. I use "push_back()" to insert a message into the list and "pop_front()" from the front the list in each cycle. But maybe since my message is too long (sizeof(message)=220), although the program is compilable, it can only run to the second cycle and pop out the debug error:
HEAP CORRUPTION DETECTED: after Normal block(#182) at 0x00389730. CRT detected that the application wrote to memory after end of heap butter.
If I delete the "pop_front()" function, the program can run to the end of the program.
Could somebody please tell me how to extend the memory for this list? or how to solve this problem.
Thank a lot.
I'm using the list template as a channel between a master and a slave. I use "push_back()" to insert a message into the list and "pop_front()" from the front the list in each cycle. But maybe since my message is too long (sizeof(message)=220), although the program is compilable, it can only run to the second cycle and pop out the debug error:
HEAP CORRUPTION DETECTED: after Normal block(#182) at 0x00389730. CRT detected that the application wrote to memory after end of heap butter.
If I delete the "pop_front()" function, the program can run to the end of the program.
Could somebody please tell me how to extend the memory for this list? or how to solve this problem.
Thank a lot.