当前位置:网站首页>GBASE 8s UDR内存管理_03_mi_realloc
GBASE 8s UDR内存管理_03_mi_realloc
2022-07-25 19:21:00 【八珍豆腐】
函数mi_realloc的作用是:将用户内存块重新分配到指定大小,并返回指向该块的指针。
语法
void *mi_realloc(void *ptr, mi_integer size)
mi_integer size;
ptr指向内存块的指针.
size要重新分配的字节数。
在客户端LIBMI应用程序中有效? | 在用户定义的例程中有效? |
是 | 是 |
用法
mi_realloc()函数将用户内存的大小更改为指定的大小,并使用当前默认的内存持续时间。如果ptr参数为NULL,那么mi_realloc()是一个用户内存的构造函数,其行为与mi_alloc()相同。
函数的作用是:返回一个指向重新分配的用户内存的指针。转换此指针以匹配您分配的用户定义缓冲区或结构的结构。当不再需要mi_realloc()分配的内存时,DataBlade API模块可以使用mi_free()来释放该内存。
返回值
一个空指针
指向重新分配内存的指针。强制转换此指针以匹配为其分配内存的用户定义缓冲区或结构。
NULL函数无法分配内存。
mi_realloc()函数在遇到运行时错误时不会抛出MI_Exception事件。因此,它不会导致回调启动。
边栏推荐
- 微信小程序 28 热搜榜的完善①
- Dynamic implementation of wechat applet 27 progress bar and static construction of search box and hot search list
- JS learning notes 17: DOM query exercise
- Flutter 小技巧之优化你使用的 BuildContext
- 帝国CMS7.5仿《问答库》题库问答学习平台网站源码 带手机版
- 网络数据包多层传输演示
- leetcode刷题:动态规划07(不同的二叉搜索树)
- Imperial cms7.5 imitation "question and answer library" question and answer learning platform website source code with mobile version
- 一个函数中写多少行代码比较合适呢? 代码整洁之道
- Wechat campus maintenance application applet graduation design finished product of applet completion work (8) graduation design thesis template
猜你喜欢

小程序毕设作品之微信校园维修报修小程序毕业设计成品(6)开题答辩PPT

Huawei recruited "talented teenagers" twice this year; 5.4 million twitter account information was leaked, with a selling price of $30000; Google fired engineers who believed in AI consciousness | gee

网络数据包多层传输演示

Modelsim and quartus jointly simulate PLL FIFO and other IP cores
![[iniparser] simple use of the project configuration tool iniparser](/img/2b/1d20b4ef44dfe2544891d9c72b676e.png)
[iniparser] simple use of the project configuration tool iniparser

英诚医院内部网络规划与设计

【刷题记录】21. 合并两个有序链表

Intouch高级报警(报警筛选)

How to ensure the consistency of double write between database and cache?

How to change the chords after the tune of the song is changed
随机推荐
Imeta | sangerbox: interactive integrated clinical information analysis platform
modelsim和quartus联合仿真PLL FIFO等IP核
Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)
聚智云算,向新而生| 有孚网络“专有云”开启新纪元
华为交换机系统软件升级和安全漏洞修复教程
【iniparser】项目配置工具iniparser的简单使用
What is the application value of MES management system
“未来杯”第二届知识图谱锦标赛正式启动
新瓶装老酒--近期APT32(海莲花)组织攻击活动样本分析
微信小程序 29 热搜榜的完善②
微信小程序 27 进度条的动态实现和搜索框、热搜榜的静态搭建
Huawei switch system software upgrade and security vulnerability repair tutorial
JS learning notes 17: DOM query exercise
i3-status 配置
Empire CMS whole station | mobile number /qq lianghao mall source code | suitable for mobile terminal
Intouch高级报警(报警筛选)
Pymoo学习 (6):终止条件
Use of swift basic codable (jsonencoder jsondecoder)
无惧高温暴雨,有孚网络如何保您无忧?
QT compiled successfully, but the program could not run