[#OPENSSL_sk_new_reserve]
= OPENSSL&lowbar;sk&lowbar;new&lowbar;reserve
:mrdocs:

Allocate a stack with comparison function `c` and room for `n` elements&period;

== Synopsis

Declared in `&lt;openssl&sol;stack&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:OPENSSL_STACK.adoc[OPENSSL&lowbar;STACK]*
OPENSSL&lowbar;sk&lowbar;new&lowbar;reserve(
    xref:OPENSSL_sk_compfunc.adoc[OPENSSL&lowbar;sk&lowbar;compfunc] c,
    int n);
----

== Return Value

New stack, or NULL on failure&semi; free with OPENSSL&lowbar;sk&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *c*
| Comparison callback, or NULL for an unordered stack&period;
| *n*
| Number of element slots to reserve up front&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
