⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mallocfreespace.c

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 C
字号:
/* *  RTEMS Malloc Get Status Information * * *  COPYRIGHT (c) 1989-2000. *  On-Line Applications Research Corporation (OAR). * *  The license and distribution terms for this file may be *  found in the file LICENSE in this distribution or at *  http://www.rtems.com/license/LICENSE. * *  $Id: mallocfreespace.c,v 1.5.2.2 2005/05/13 17:09:26 jennifer Exp $ */#if HAVE_CONFIG_H#include "config.h"#endif#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__#include <rtems.h>#include <rtems/libcsupport.h>#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <assert.h>#include <errno.h>#include <string.h>extern rtems_id RTEMS_Malloc_Heap;/* *  Find amount of free heap remaining */size_t malloc_free_space( void ){  Heap_Information  heap_info;  if ( !rtems_region_get_free_information( RTEMS_Malloc_Heap, &heap_info ) ) {    return (size_t) heap_info.largest;  }  return (size_t) -1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -