資源簡介
DSP課程軟件CCS2.0安裝包
代碼片段和文件信息
/*?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_
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????77824??2001-05-10?16:02??ti\bin\cdbprint.exe
?????文件??????36864??2000-10-19?16:13??ti\bin\cfrename.exe
????.......?????20480??2000-11-03?13:04??ti\bin\check.exe
?????文件??????36864??2000-10-19?16:13??ti\bin\cmpti.exe
????.......?????20480??2000-11-03?13:04??ti\bin\copyfile.exe
?????文件??????32768??2001-05-21?13:06??ti\bin\daisgen.exe
????.......????192512??2000-03-09?12:28??ti\bin\gmake.exe
?????文件??????28672??2001-04-09?11:05??ti\bin\nmti.exe
?????文件??????32768??2000-10-19?16:13??ti\bin\refcheck.exe
????.......?????20480??2000-11-03?13:04??ti\bin\remove.exe
?????文件??????16384??2001-05-24?11:55??ti\bin\runonce.exe
?????文件??????28672??2001-04-09?11:05??ti\bin\sectti.exe
?????文件??????32768??2000-10-19?16:13??ti\bin\sizeti.exe
?????文件?????????13??2000-03-09?12:24??ti\bin\src\gmake\.tools-$_V
????.......?????????0??2000-03-09?11:42??ti\bin\src\gmake\.tools-y33
????.......??????1179??1999-04-26?07:25??ti\bin\src\gmake\acconfig.h
????.......?????15540??1999-09-10?22:59??ti\bin\src\gmake\acinclude.m4
????.......?????19745??1999-09-23?10:33??ti\bin\src\gmake\aclocal.m4
????.......?????14238??1996-07-03?16:05??ti\bin\src\gmake\alloca.c
????.......??????2645??1999-03-05?07:02??ti\bin\src\gmake\amiga.c
????.......???????919??1999-03-05?07:02??ti\bin\src\gmake\amiga.h
????.......??????7978??1999-07-28?07:23??ti\bin\src\gmake\ar.c
????.......?????20114??1999-08-09?08:23??ti\bin\src\gmake\arscan.c
????.......??????1522??1999-07-21?21:42??ti\bin\src\gmake\AUTHORS
?????文件???????2464??1999-09-23?10:34??ti\bin\src\gmake\build.sh.in
????.......?????16152??1999-07-06?12:20??ti\bin\src\gmake\build_w32.bat
?????文件??????16575??2000-03-09?11:41??ti\bin\src\gmake\build_w32.batnewunused
????.......????217790??1999-09-23?10:45??ti\bin\src\gmake\ChangeLog
????.......?????13473??1999-07-28?07:23??ti\bin\src\gmake\commands.c
????.......??????1832??1999-03-05?07:02??ti\bin\src\gmake\commands.h
............此處省略7301個(gè)文件信息
評論
共有 條評論