This is my situation:
I am reading in a very large file, say over 1GB and for every line I interpret and extract parts of the line to create an object. Therefore, I am continuously allocating memory:
//For each line in a 1GB file:
boost::shared_ptr<MyClass>(new MyClass(part_of_line[0], part_of_line[1]));
therefore I'd like to write some sort of custom memory manager. I haven't done this before and I am not too sure how to approach it, but basically I'd like to group together all the allocations and decrease the time spent allocating memory AND it would be better if the memory allocated was continuous.
Are there any pre-existing libraries already written (boost?) for such a problem domain which would help me realise performance gains?
Alternatively under what situation would it be better for me to write my own custom memory manager?
I presume the answer is tied with how general a library pool is written and how different my situation is to the general case??