static int mem_init(BIO *bi, unsigned long flags)
{
    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));
    if (bb == NULL)
        return(0);
    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL)
        return(0);
    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL)
        return(0);
    *bb->readp = *bb->buf;
    bi->shutdown = 1;
    bi->init = 1;
    bi->num = -1;
    bi->ptr = (char *)bb;
    return(1);
}
['static int mem_init(BIO *bi, unsigned long flags)\n{\n    BIO_BUF_MEM *bb = OPENSSL_zalloc(sizeof(*bb));\n    if (bb == NULL)\n        return(0);\n    if ((bb->buf = BUF_MEM_new_ex(flags)) == NULL)\n        return(0);\n    if ((bb->readp = OPENSSL_zalloc(sizeof(*bb->readp))) == NULL)\n        return(0);\n    *bb->readp = *bb->buf;\n    bi->shutdown = 1;\n    bi->init = 1;\n    bi->num = -1;\n    bi->ptr = (char *)bb;\n    return(1);\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}']