On 7/30/2018 1:57 AM, Christian Böhme wrote:
> What's the reason for using malloc(3) in the first place? Is this a
> limitation of the library or just openssl cms ?
>
> For the latter, if the argument to -in can be determined to resolve to
> a file descriptor of a regular file, the file's contents can be /very/
> conveniently mmap(2)'ed into the process' address space, ignoring
> possible limits.
>
If you can't malloc the space, you probably can't mmap it either.  I
have never heard of a malloc implementation that has artificial limits;
if it's failing it's because it can't find that much contiguous virtual
address space, and mmap won't be able to find it either.

If you're a 32-bit process, then malloc'ing or mmap'ing a 2GB object
will be difficult at best.

-- 
Jordan Brown, Oracle Solaris

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to