Large-scale network simulation of Ofomnet engineering debugging cannot have C + + memory Overflow

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.