/* ǂݎEݗpBIO쐬 */
bio = BIO_new(BIO_s_mem());
 
/* 蓖Ăꂽobt@gpāAǂݎpBIO쐬 */
buffer = malloc(4096);
bio = BIO_new_mem_buf(buffer, 4096);
 
/* C̕Ɠ`̕gpāAǂݎpBIO쐬 */
bio = BIO_new_mem_buf("This is a read-only buffer.", -1);
 
/* BIÕZOgւ̃|C^擾 */
BIO_get_mem_ptr(bio, &buffer);
 
/* BIOjƂɁÃZOgjȂ悤ɂ */
BIO_set_close(bio, BIO_NOCLOSE);