Lutz Jaenicke writes:

[...]

> Yes, only 100MB might be actually used but the 2GB would still be
> reserved in memory.
> To get an idea about this behavior you can write a simple program like


And just to elaborate a little, if other processes need this memory,
the OS will swap out the unused memory after a short time. So the
memory consumed will take up swap space, but will not take up actual
memory if the OS has a better use for it.

If this presents a real problem, the general solution is to use a
specialized malloc, which uses a memory allocation method that allows
returning memory to the OS, such as mmap. I'm not sure how to use a
custom malloc with OpenSSL, but hopefully this will give you something
useful to Google for. And it's worth noting that it this sort of
memory usage doesn't usually cause a real problem.

Good luck!

----Scott.
__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org