资源简介
GNU MAKE程序的源码。来自GNU官方网站,编译需要make和gcc、
代码片段和文件信息
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
This implementation of the PWB library alloca function
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant contributed the Cray support.
There are some preprocessor constants that can
be defined when compiling for your specific system for
improved efficiency; however the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid but it will do so eventually.
As a special case alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
#include
#endif
#ifdef HAVE_STRING_H
#include
#endif
#ifdef HAVE_STDLIB_H
#include
#endif
#ifdef emacs
#include “blockinput.h“
#endif
/* If compiling with GCC 2 this file‘s not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro
there must be some other way alloca is supposed to work. */
#ifndef alloca
#ifdef emacs
#ifdef static
/* actually only want this if static is defined as ““
-- this is for usg in which emacs must undefine static
in order to make unexec workable
*/
#ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
#endif /* STACK_DIRECTION undefined */
#endif /* static */
#endif /* emacs */
/* If your stack is a linked list of frames you have to
provide an “address metric“ ADDRESS_FUNCTION macro. */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
#if __STDC__
typedef void *pointer;
#else
typedef char *pointer;
#endif
#ifndef NULL
#define NULL 0
#endif
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc because
ordinary malloc isn‘t protected from input signals. On the other
hand the utilities in lib-src need alloca to call malloc; some of
them are very simple and don‘t have an xmalloc routine.
Non-Emacs programs expect this to call use xmalloc.
Callers below should use malloc. */
#ifndef emacs
#define malloc xmalloc
#endif
extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_
- 上一篇:LPC2136单片机说明
- 下一篇:基于形态学的图像分割 图片版
相关资源
- CTFcrackTools-V2.2
- ApabiMakerPro5.0.1.1889专业版破解
- AxToolsVer134_SetUp_E
- ARToolkit NFT 帮助文档
- FlashTool.1.0.54英文破解版
- OpenGL库(包括glewfreeglut和gltools)
- 实验一 嵌入式Linux开发环境的搭建及
- Make Your Own Neural Network.pdf
- GadgetWide Tool
- PC新版付费音乐免费器MusicToolsv3.1.2.
- PeopleTools_8.12_PeopleCode手册
- vm tools mac 10.14 darwin11.0.iso
- AMI BIOS change logo tool
- tool微信解密.zip
- IROM_Fusing_ToolSD卡烧写工具源码包
- 针对vmware15&macos10;.14版本的vmware tool
- EMUI10Tools_10.0.0.185.7z
- Data_Mining-Practical Machine Learning Tools
- MTK2503工具FlashTool_v5.1640.00
- qt vs 2015 tools
- tool.zip
- MRT(MODIS Reprojection Tool)软件及其安装
- MIMO在GNURadio中的实现
- CrystalMaker系列之CrystalDiffract
- 关系中双字符转字符串,针对Creo3.0版
- Elecard StreamEye Tools 2.9.2.70710
- MediaCreationTool1903.7z
- crestron 学习
- 利用solarwinds map maker制作直观流量拓扑
- make-3.81.exe
评论
共有 条评论