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

📄 check_mapbrk.c.svn-base

📁 我们自己开发的一个OSEK操作系统!不知道可不可以?
💻 SVN-BASE
字号:
#include <stdio.h>#include <stdlib.h>/* Basic sanity check that syscalls to implement malloc (brk, mmap2,   munmap) are trivially functional.  */int main (){  void *p1, *p2, *p3, *p4, *p5, *p6;  if ((p1 = malloc (8100)) == NULL      || (p2 = malloc (16300)) == NULL      || (p3 = malloc (4000)) == NULL      || (p4 = malloc (500)) == NULL      || (p5 = malloc (1023*1024)) == NULL      || (p6 = malloc (8191*1024)) == NULL)  {    printf ("fail\n");    exit (1);  }  free (p1);  free (p2);  free (p3);  free (p4);  free (p5);  free (p6);  p1 = malloc (64000);  if (p1 == NULL)  {    printf ("fail\n");    exit (1);  }  free (p1);  printf ("pass\n");  exit (0);}

⌨️ 快捷键说明

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