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

📄 alloc_pbuf.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#ifndef lintstatic  char sccsid[] = "@(#)alloc_pbuf.c 1.1 92/07/30 SMI";#endif/* * Copyright (c) 1987 Sun Microsystems, Inc. */#include <fcntl.h>#include <sys/mman.h>/* allocate the buffer to be used by profil(2)  */char *_alloc_profil_buf(size)	int size;{	char *buf;	int fd;	if((fd = open("/dev/zero",O_RDONLY)) == -1 ) {		return (char*) -1;	}	buf = (char*) mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);	close(fd);	return buf;}

⌨️ 快捷键说明

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