Menu
  • HOME
  • TAGS

Increasing allocation performance for strings

c++,linux,memory-management,boost,memory-pool

The problem is you're using a new string stream each time to convert an integer. Fix it: namespace patch { template <typename T> pool_string to_string(const T& in) { return boost::lexical_cast<pool_string>(in); } } Now the timings are: DOING AN OLD 0.175462 0.0670085 0.0669926 0.0687969 0.0692518 0.0669318 0.0669196 0.0669187 0.0668962 0.0669185 real...

Where Do I Set the Eden Space?

tomcat,configuration,java-8,memory-pool,metaspace

Several issues: -Xms sets the initial Heap space and has nothing to do with Eden space. That's what the JVM allocates on startup. If more is required, it allocates up to -Xmx later, but this applies to the total heap space, not one of the GC generation spaces (those will...

How do I ensure Python “zeros” memory when it is garbage collected?

python,memory,memory-pool

It turns out that the problem was an absolutely stupid mistake in my own code that did the memset. I'm going to reach out to @Calyth, who generously added a bounty to this question, before 'accepting' this answer. In short and simplified, the malloc/free wrapper functions work like this: Code...

boost::pool real memory allocations

c++,boost,memory-pool,boost-pool

Is this explainable? Yes. Do I need to use another tool instead of ps to see the memory used by the program? You are seeing the memory used by the program. What you didn't take into account: memory allocation routines are heavily optimized. Libraries (like libc) will use various...