Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The C runtime allocates more memory than your process actually uses as part of normal operation. This is because allocating memory at the kernel level is extremely slow, and can only be done in page sized blocks (Page size is typically 4kb on x86 boxes, but it can be larger, and is usually 8kb or more on x64 machines).</p> <p>Furthermore, when the C runtime receives an allocation request it cannot satisfy, it will often allocate more than is necessary, again, to remove the expense of going to the kernel most of the time.</p> <p>Finally, if you're using boost goodies, they probably depend on some STL components, such as <code>std::vector</code>. These components allocate space for elements using <code>std::allocator&lt;T&gt;</code>, which in some instances will again allocate more space than is actually used. (In particular, node-based structures like <code>std::map</code>, <code>std::set</code>, and <code>std::list</code> usually do this to put the nodes of the list or tree together on the same memory page)</p> <p>Long story short: Don't worry about this. Half a meg of memory isn't a lot by any stretch of the imagination (At least nowadays), and most of that is probably just amortizing the use of dynamic allocation functions. Write up your actual server, and if it's using too much memory, THEN look at ways of reducing memory usage.</p> <p>EDIT: If the component of boost you're using happens to be asio, and you're using sockets, you should also know there's some memory consumed in order to maintain buffers for sockets too.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload