小编Anu*_*Anu的帖子

如何获得程序的堆大小

如何在linux平台下找到c ++程序的堆内存大小?我需要在使用new或malloc之前的堆内存空间以及之后.任何人都可以帮忙吗?

#include <malloc.h>
#include <iostream>
int main()
{

     //here need heap memory space
     unsigned char* I2C_Read_Data= new unsigned char[250];
     //get heap memory space After the usage of new 
     return 0;
 }
Run Code Online (Sandbox Code Playgroud)

c c++ linux

12
推荐指数
3
解决办法
2万
查看次数

标签 统计

c ×1

c++ ×1

linux ×1