C + + memory overflow is an obstacle to large-scale network emulation!
Solution: It is not scary to encounter this problem, first look at the current simulation of the number of packets is not huge, is to find each packet in which module stay, change the corresponding code. If this is not the problem, then construct a simple network, Replace the module you wrote with the module in inet to find the problem module and change it.
About the story:
Today, we find that the switch has created a match struct for querying the flow table without deleting it, and the clipping code is as follows.
void open_flow_processing::p rocessqueuedmsg (Cmessage *data_msg) {
...
new Oxm_basic_match ();
...
Using this code to run a large data volume of network simulation, a few seconds before the following bug occurred. It's obvious that each packet is wasted on oxm_basic_match-sized memory, so it's not working out how many packets are being processed.
Simulation terminated with exit code:3working Directory:d:/omnetpp-4.2.2/samples/openflow/scenarioscommand line:. /openflow.exe-r 0-u cmdenv-c exr-noweight-n...... /.. /inet/examples, .... /.. /inet/src-l. /.. /inet/src/inet--record-eventlog=false--debug-on-errors=false Ft42.ini
Or
Unable to alloc bytesthis application have requested the Runtime to terminate it in an unusual. Please contact the application's support team for more information. Font {Segoe UI} 9 still in cache. Simulation terminated with exit code:3working Directory:d:/omnetpp-4.2.2/samples/openflow/scenarioscommand line:. /openflow.exe-r 0-u tkenv-c exr-noweight-n...... /.. /inet/examples, .... /.. /inet/src-l. /.. /inet/src/inet--record-eventlog=false--debug-on-errors=false Ft42.ini
Large-scale network simulation of Ofomnet engineering debugging cannot have C + + memory Overflow