design for a parser to handle very large files

Posted by user619818 on Programmers See other posts from Programmers or by user619818
Published on 2012-10-15T16:49:00Z Indexed on 2012/10/15 21:49 UTC
Read the original article Hit count: 238

Filed under:
|

I have written a program which records protocol messages between an application and a hardware device which matches each application request with each hardware response. This is so that I can later remove the hardware, connect a 'replay' application to the main application and wait for an application request and reply with a matched copy of the requisite hardware reply message.

My replay application saves the matched request/response in a list (using C++ std::list).

This works fine on a small interaction session. My problem now is that I need to be able to use the replay over a long long session. With my current implementation, the replay program eventually uses up all available memory on my computer and crashes.

So I need some sort of lookahead - and not parse the whole session in one go.

Can anyone make any suggestions on how to get started?

© Programmers or respective owner

Related posts about c++

Related posts about parser