``` int error_code = O1HEAP_NO_ERROR; O1HeapInstance* h = o1heapInit(my_buffer, my_buffer_size, &error_code); if (error_code == O1HEAP_ERR_BASE_TOO_SMALL) { throw my_buffer_too_small_exception(); } ``` etc.