Instead of having two different systems for allocation, we should move to an alloc/init model. We should use a fixed size context (the largest possible size) since this is sharable. (maybe this is a compiler flag?)
Use uninitialized static memory or call malloc yourself, this is the self managed model. You would do this for self managed:
secp256k1_context* ctx = malloc(sizeof(secp256k1_context));
Then call secp256k1_context_initialize(ctx, flags);
This is consistent with how every other operation handles memory. The caller provides it.
An alternative would be to provide an allocator to the initialize function.
A deprecated convenance function using malloc / free to provide back compatibility can be used as well