您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ x_malloc函数代码示例

51自学网 2021-06-03 10:15:05
  C++
这篇教程C++ x_malloc函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中x_malloc函数的典型用法代码示例。如果您正苦于以下问题:C++ x_malloc函数的具体用法?C++ x_malloc怎么用?C++ x_malloc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了x_malloc函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: MibRegister

mib_object_t *MibRegister( ul32 *Id, u16 IdLen, mib_callback_t Rqs, u16 Type, u16 Support, void *Param ){    mib_object_t *object;    object = (mib_object_t *)x_malloc(sizeof(mib_object_t));    if (object == 0) {        x_dbg("XSNMP, MibRegister: object is 0/n", TRUE);        return 0;    }    if( !IdLen )        x_dbg("XSNMP, MibRegister: Idlen == 0/n", TRUE);    object->Id = (ul32 *)x_malloc(IdLen * sizeof(l32));    if (object->Id == 0) {        x_dbg("XSNMP, MibRegister: object->ID is 0/n", TRUE);        return 0;    }    x_memcpy(object->Id, Id, IdLen * sizeof(l32));    object->IdLen	= IdLen;    object->Rqs		= Rqs;    object->Type	= Type;    object->Support	= Support;    object->Param	= Param;    if (!MibObjectInsert(object)) {        x_free(object->Id);        x_free(object);        x_dbg("XSNMP, MibRegister: MibObjectInsert fail/n", TRUE);        return 0;    }    return object;}
开发者ID:JoeAltmaier,项目名称:Odyssey,代码行数:33,


示例2: apply_voronoi

void apply_voronoi (hf_wrapper_struct *hfw) {//	gint t1;	if (!hfw->hf_struct->tmp_buf)		hf_backup(hfw->hf_struct);	if (!hfw->hf_struct->result_buf)		hfw->hf_struct->result_buf = 			(hf_type *) x_malloc(sizeof(hf_type) * hfw->hf_struct->max_x  * hfw->hf_struct->max_y, "hf_type (result_buf in apply_voronoi)");	if (!hfw->hf_struct->tmp2_buf)		hfw->hf_struct->tmp2_buf = 			(hf_type *) x_malloc(sizeof(hf_type) * hfw->hf_struct->max_x  * hfw->hf_struct->max_y, "hf_type (tmp2_buf in apply_voronoi)");//	t1 = clock();	// Convention:	// 1. tmp_buf: original HF	// 2. tmp2_buf: distance HF	// 3. result_buf: crackled HF (base level + black lines == cracks)	// 4. hf_buf: output = crackled HF + distance HF (for lifting edges)	set_watch_cursor(hfw);		hf_voronoi(hfw->hf_struct, hfw->hf_options->img->voronoi);		voronoi_adjust_edges (hfw->hf_struct->result_buf, hfw->hf_struct->hf_buf, hfw->hf_struct->tmp2_buf, hfw->hf_options->img->voronoi->edges_level,  hfw->hf_struct->max_x, hfw->hf_struct->max_y);		unset_watch_cursor(hfw);// printf("TEMPS DE CRAQU
C++ x_return_val_if_fail函数代码示例
C++ x_check_conn函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。