亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? library_3.html

?? linux_c函數,linux下編程必備的
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
the obstack automatically starts on an address that is a multiple of the
specified boundary.  By default, this boundary is 4 bytes.
<P>
To access an obstack's alignment boundary, use the macro
<CODE>obstack_alignment_mask</CODE>, whose function prototype looks like
this:
<P>
<A NAME="IDX202"></A>
<U>Macro:</U> int <B>obstack_alignment_mask</B> <I>(struct obstack *<VAR>obstack_ptr</VAR>)</I><P>
The value is a bit mask; a bit that is 1 indicates that the corresponding
bit in the address of an object should be 0.  The mask value should be one
less than a power of 2; the effect is that all object addresses are
multiples of that power of 2.  The default value of the mask is 3, so that
addresses are multiples of 4.  A mask value of 0 means an object can start
on any multiple of 1 (that is, no alignment is required).
<P>
The expansion of the macro <CODE>obstack_alignment_mask</CODE> is an lvalue,
so you can alter the mask by assignment.  For example, this statement:
<P>
<PRE>
obstack_alignment_mask (obstack_ptr) = 0;
</PRE>
<P>
has the effect of turning off alignment processing in the specified obstack.
<P>
Note that a change in alignment mask does not take effect until
<EM>after</EM> the next time an object is allocated or finished in the
obstack.  If you are not growing an object, you can make the new
alignment mask take effect immediately by calling <CODE>obstack_finish</CODE>.
This will finish a zero-length object and then do proper alignment for
the next object.
<P>
<A NAME="IDX203"></A>
<A NAME="IDX204"></A>
<H3><A NAME="SEC43" HREF="library_toc.html#SEC43" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC43">Obstack Chunks</A></H3>
<P>
Obstacks work by allocating space for themselves in large chunks, and
then parceling out space in the chunks to satisfy your requests.  Chunks
are normally 4096 bytes long unless you specify a different chunk size.
The chunk size includes 8 bytes of overhead that are not actually used
for storing objects.  Regardless of the specified size, longer chunks
will be allocated when necessary for long objects.
<P>
The obstack library allocates chunks by calling the function
<CODE>obstack_chunk_alloc</CODE>, which you must define.  When a chunk is no
longer needed because you have freed all the objects in it, the obstack
library frees the chunk by calling <CODE>obstack_chunk_free</CODE>, which you
must also define.
<P>
These two must be defined (as macros) or declared (as functions) in each
source file that uses <CODE>obstack_init</CODE> (see section <A HREF="library_3.html#SEC34" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC34">Creating Obstacks</A>).
Most often they are defined as macros like this:
<P>
<PRE>
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
</PRE>
<P>
Note that these are simple macros (no arguments).  Macro definitions with
arguments will not work!  It is necessary that <CODE>obstack_chunk_alloc</CODE>
or <CODE>obstack_chunk_free</CODE>, alone, expand into a function name if it is
not itself a function name.
<P>
The function that actually implements <CODE>obstack_chunk_alloc</CODE> cannot
return "failure" in any fashion, because the obstack library is not
prepared to handle failure.  Therefore, <CODE>malloc</CODE> itself is not
suitable.  If the function cannot obtain space, it should either
terminate the process (see section <A HREF="library_22.html#SEC395" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_22.html#SEC395">Program Termination</A>) or do a nonlocal
exit using <CODE>longjmp</CODE> (see section <A HREF="library_20.html#SEC326" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_20.html#SEC326">Non-Local Exits</A>).
<P>
If you allocate chunks with <CODE>malloc</CODE>, the chunk size should be a
power of 2.  The default chunk size, 4096, was chosen because it is long
enough to satisfy many typical requests on the obstack yet short enough
not to waste too much memory in the portion of the last chunk not yet used.
<P>
<A NAME="IDX205"></A>
<U>Macro:</U> size_t <B>obstack_chunk_size</B> <I>(struct obstack *<VAR>obstack_ptr</VAR>)</I><P>
This returns the chunk size of the given obstack.
<P>
Since this macro expands to an lvalue, you can specify a new chunk size by
assigning it a new value.  Doing so does not affect the chunks already
allocated, but will change the size of chunks allocated for that particular
obstack in the future.  It is unlikely to be useful to make the chunk size
smaller, but making it larger might improve efficiency if you are
allocating many objects whose size is comparable to the chunk size.  Here
is how to do so cleanly:
<P>
<PRE>
if (obstack_chunk_size (obstack_ptr) &#60; <VAR>new_chunk_size</VAR>)
  obstack_chunk_size (obstack_ptr) = <VAR>new_chunk_size</VAR>;
</PRE>
<P>
<H3><A NAME="SEC44" HREF="library_toc.html#SEC44" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC44">Summary of Obstack Functions</A></H3>
<P>
Here is a summary of all the functions associated with obstacks.  Each
takes the address of an obstack (<CODE>struct obstack *</CODE>) as its first
argument.
<P>
<DL COMPACT>
<DT><CODE>void obstack_init (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Initialize use of an obstack.  See section <A HREF="library_3.html#SEC34" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC34">Creating Obstacks</A>.
<P>
<DT><CODE>void *obstack_alloc (struct obstack *<VAR>obstack_ptr</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Allocate an object of <VAR>size</VAR> uninitialized bytes.
See section <A HREF="library_3.html#SEC36" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC36">Allocation in an Obstack</A>.
<P>
<DT><CODE>void *obstack_copy (struct obstack *<VAR>obstack_ptr</VAR>, void *<VAR>address</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Allocate an object of <VAR>size</VAR> bytes, with contents copied from
<VAR>address</VAR>.  See section <A HREF="library_3.html#SEC36" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC36">Allocation in an Obstack</A>.
<P>
<DT><CODE>void *obstack_copy0 (struct obstack *<VAR>obstack_ptr</VAR>, void *<VAR>address</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Allocate an object of <VAR>size</VAR>+1 bytes, with <VAR>size</VAR> of them copied
from <VAR>address</VAR>, followed by a null character at the end.
See section <A HREF="library_3.html#SEC36" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC36">Allocation in an Obstack</A>.
<P>
<DT><CODE>void obstack_free (struct obstack *<VAR>obstack_ptr</VAR>, void *<VAR>object</VAR>)</CODE>
<DD>Free <VAR>object</VAR> (and everything allocated in the specified obstack
more recently than <VAR>object</VAR>).  See section <A HREF="library_3.html#SEC37" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC37">Freeing Objects in an Obstack</A>.
<P>
<DT><CODE>void obstack_blank (struct obstack *<VAR>obstack_ptr</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Add <VAR>size</VAR> uninitialized bytes to a growing object.
See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>void obstack_grow (struct obstack *<VAR>obstack_ptr</VAR>, void *<VAR>address</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Add <VAR>size</VAR> bytes, copied from <VAR>address</VAR>, to a growing object.
See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>void obstack_grow0 (struct obstack *<VAR>obstack_ptr</VAR>, void *<VAR>address</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Add <VAR>size</VAR> bytes, copied from <VAR>address</VAR>, to a growing object,
and then add another byte containing a null character.  See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>void obstack_1grow (struct obstack *<VAR>obstack_ptr</VAR>, char <VAR>data_char</VAR>)</CODE>
<DD>Add one byte containing <VAR>data_char</VAR> to a growing object.
See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>void *obstack_finish (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Finalize the object that is growing and return its permanent address.
See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>size_t obstack_object_size (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Get the current size of the currently growing object.  See section <A HREF="library_3.html#SEC39" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC39">Growing Objects</A>.
<P>
<DT><CODE>void obstack_blank_fast (struct obstack *<VAR>obstack_ptr</VAR>, size_t <VAR>size</VAR>)</CODE>
<DD>Add <VAR>size</VAR> uninitialized bytes to a growing object without checking
that there is enough room.  See section <A HREF="library_3.html#SEC40" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC40">Extra Fast Growing Objects</A>.
<P>
<DT><CODE>void obstack_1grow_fast (struct obstack *<VAR>obstack_ptr</VAR>, char <VAR>data_char</VAR>)</CODE>
<DD>Add one byte containing <VAR>data_char</VAR> to a growing object without
checking that there is enough room.  See section <A HREF="library_3.html#SEC40" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC40">Extra Fast Growing Objects</A>.
<P>
<DT><CODE>size_t obstack_room (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Get the amount of room now available for growing the current object.
See section <A HREF="library_3.html#SEC40" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC40">Extra Fast Growing Objects</A>.
<P>
<DT><CODE>int obstack_alignment_mask (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>The mask used for aligning the beginning of an object.  This is an
lvalue.  See section <A HREF="library_3.html#SEC42" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC42">Alignment of Data in Obstacks</A>.
<P>
<DT><CODE>size_t obstack_chunk_size (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>The size for allocating chunks.  This is an lvalue.  See section <A HREF="library_3.html#SEC43" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC43">Obstack Chunks</A>.
<P>
<DT><CODE>void *obstack_base (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Tentative starting address of the currently growing object.
See section <A HREF="library_3.html#SEC41" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC41">Status of an Obstack</A>.
<P>
<DT><CODE>void *obstack_next_free (struct obstack *<VAR>obstack_ptr</VAR>)</CODE>
<DD>Address just after the end of the currently growing object.
See section <A HREF="library_3.html#SEC41" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_3.html#SEC41">Status of an Obstack</A>.
</DL>
<P>
<A NAME="IDX206"></A>
<A NAME="IDX207"></A>
<A NAME="IDX208"></A>
<H2><A NAME="SEC45" HREF="library_toc.html#SEC45" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC45">Automatic Storage with Variable Size</A></H2>
<P>
The function <CODE>alloca</CODE> supports a kind of half-dynamic allocation in
which blocks are allocated dynamically but freed automatically.
<P>
Allocating a block with <CODE>alloca</CODE> is an explicit action; you can
allocate as many blocks as you wish, and compute the size at run time.  But
all the blocks are freed when you exit the function that <CODE>alloca</CODE> was
called from, just as if they were automatic variables declared in that
function.  There is no way to free the space explicitly.
<P>
The prototype for <CODE>alloca</CODE> is in <TT>`stdlib.h'</TT>.  This function is
a BSD extension.
<A NAME="IDX209"></A>
<P>
<A NAME="IDX210"></A>
<U>Function:</U> void * <B>alloca</B> <I>(size_t <VAR>size</VAR>);</I><P>
The return value of <CODE>alloca</CODE> is the address of a block of <VAR>size</VAR>
bytes of storage, allocated in the stack frame of the calling function.
<P>
Do not use <CODE>alloca</CODE> inside the arguments of a function call--you
will get unpredictable results, because the stack space for the
<CODE>alloca</CODE> would appear on the stack in the middle of the space for
the function arguments.  An example of what to avoid is <CODE>foo (x,
alloca (4), y)</CODE>.
<P>
<H3><A NAME="SEC46" HREF="library_toc.html#SEC46" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC46"><CODE>alloca</CODE> Example</A></H3>
<P>
As an example of use of <CODE>alloca</CODE>, here is a function that opens a file
name made from concatenating two argument strings, and returns a file
descriptor or minus one signifying failure:
<P>
<PRE>
int
open2 (char *str1, char *str2, int flags, int mode)
{
  char *name = (char *) alloca (strlen (str1) + strlen (str2) + 1);
  strcpy (name, str1);
  strcat (name, str2);
  return open (name, flags, mode);
}
</PRE>
<P>
Here is how you would get the same results with <CODE>malloc</CODE> and
<CODE>free</CODE>:
<P>
<PRE>
int
open2 (char *str1, char *str2, int flags, int mode)
{
  char *name = (char *) malloc (strlen (str1) + strlen (str2) + 1);
  int desc;
  if (name == 0)
    fatal ("virtual memory exceeded");
  strcpy (name, str1);
  strcat (name, str2);
  desc = open (name, flags, mode);
  free (name);
  return desc;
}
</PRE>
<P>
As you can see, it is simpler with <CODE>alloca</CODE>.  But <CODE>alloca</CODE> has
other, more important advantages, and some disadvantages.
<P>
<H3><A NAME="SEC47" HREF="library_toc.html#SEC47" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC47">Advantages of <CODE>alloca</CODE></A></H3>
<P>
Here are the reasons why <CODE>alloca</CODE> may be preferable to <CODE>malloc</CODE>:
<P>
<UL>
<LI>
Using <CODE>alloca</CODE> wastes very little space and is very fast.  (It is
open-coded by the GNU C compiler.)
<P>
<LI>
Since <CODE>alloca</CODE> does not have separate pools for different sizes of
block, space used for any size block can be reused for any other size.
<CODE>alloca</CODE> does not cause storage fragmentation.
<P>
<A NAME="IDX211"></A>
<LI>
Nonlocal exits done with <CODE>longjmp</CODE> (see section <A HREF="library_20.html#SEC326" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_20.html#SEC326">Non-Local Exits</A>)
automatically free the space allocated with <CODE>alloca</CODE> when they exit
through the function that ca

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一区二区三区地区| 奇米888四色在线精品| 国产精品成人一区二区三区夜夜夜 | 亚洲欧美日本韩国| 日韩高清不卡在线| av亚洲精华国产精华精华| 日韩欧美在线123| 亚洲最大色网站| 日韩一区日韩二区| 欧美精品少妇一区二区三区| 精品久久久久久久久久久久久久久久久| 久久天天做天天爱综合色| 亚洲成人免费视| www.欧美日韩| 欧美国产精品一区二区三区| 麻豆91在线看| 欧美肥妇free| 亚洲成av人影院在线观看网| 97超碰欧美中文字幕| 国产欧美日韩三区| 激情六月婷婷综合| 91精品久久久久久久91蜜桃| 一区二区欧美在线观看| 99精品久久免费看蜜臀剧情介绍| 欧美成人在线直播| 麻豆成人免费电影| 日韩欧美综合在线| 欧美视频一区二区三区四区| 欧美中文字幕一二三区视频| 久久久久久久久久久久久久久99 | 久久超碰97中文字幕| 欧美天堂一区二区三区| 亚洲少妇屁股交4| 99在线视频精品| 欧美激情一区二区在线| 国产精品一品二品| 欧美国产激情二区三区| 国产suv一区二区三区88区| 久久亚洲综合色一区二区三区 | 国产一区二三区好的| 欧美一区二区三区免费大片| 日本不卡视频在线| 精品国产百合女同互慰| 国产一区啦啦啦在线观看| 久久久久久久久久久久久女国产乱| 国产黄人亚洲片| 国产精品久久久久一区二区三区| 97精品国产露脸对白| 一区二区三区久久久| 在线不卡免费av| 韩国在线一区二区| 国产嫩草影院久久久久| 99精品1区2区| 午夜在线成人av| 精品少妇一区二区三区日产乱码| 亚洲一区二区三区在线看| 精品视频在线免费看| 婷婷激情综合网| 精品卡一卡二卡三卡四在线| 另类小说一区二区三区| 国产亚洲精品超碰| 91国偷自产一区二区三区观看| 亚洲成人午夜电影| www国产成人| 91美女在线视频| 日本不卡一区二区三区| 精品久久久久久久人人人人传媒| 日韩一区二区在线看| 成人午夜在线视频| 亚洲成a人在线观看| 亚洲精品在线网站| 91国偷自产一区二区三区成为亚洲经典| 日本伊人午夜精品| 国产精品久久久爽爽爽麻豆色哟哟| 欧美日韩免费观看一区二区三区 | 欧美日韩黄视频| 日本一二三不卡| av在线播放一区二区三区| 亚洲精品乱码久久久久久黑人| 在线成人av网站| www.性欧美| 久久9热精品视频| 综合激情网...| 欧美大尺度电影在线| 99久久久久久99| 国产主播一区二区三区| 亚洲一区二区在线观看视频| 久久久久久电影| 欧美日韩国产在线观看| 99久久久无码国产精品| 国产精品综合av一区二区国产馆| 一区二区三区四区乱视频| 久久久久久久免费视频了| 欧美日韩一卡二卡| 色一情一伦一子一伦一区| 国产精品自拍一区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产成人午夜99999| 99久久伊人精品| 欧美一区二区视频观看视频| 国产.精品.日韩.另类.中文.在线.播放 | 午夜视频在线观看一区| 自拍偷自拍亚洲精品播放| 久久精品视频一区二区| 欧美一级久久久久久久大片| 欧美日韩美少妇| 欧美性猛交xxxxxx富婆| 99久久久久免费精品国产 | 91精品国产综合久久久蜜臀粉嫩 | 欧美精品久久久久久久久老牛影院| 91原创在线视频| 成人天堂资源www在线| 国产一区二区女| 免费在线观看视频一区| 午夜av区久久| 日韩电影免费一区| 欧美在线不卡视频| 粉嫩一区二区三区性色av| 精品亚洲成av人在线观看| 免费在线观看日韩欧美| 麻豆精品在线播放| 极品少妇一区二区| 国产制服丝袜一区| 国产成人精品亚洲日本在线桃色| 国产一区二区看久久| 国产成人无遮挡在线视频| 国产精品18久久久久久久网站| 国产乱子轮精品视频| 粉嫩av亚洲一区二区图片| 丁香天五香天堂综合| 91色在线porny| 91福利区一区二区三区| 欧美日韩高清一区二区三区| 欧美一区二区三区白人 | 欧美午夜精品一区二区三区| 欧美午夜精品免费| 日韩欧美在线影院| 欧美激情在线观看视频免费| 亚洲黄色小视频| 午夜av一区二区| 国产精品一区在线| 91小视频在线免费看| 在线播放91灌醉迷j高跟美女 | 久久一区二区三区国产精品| 欧美国产1区2区| 亚洲图片欧美一区| 精品一区二区三区久久久| 成人的网站免费观看| 欧洲亚洲国产日韩| 日韩欧美国产三级电影视频| 久久亚洲综合av| 亚洲免费视频成人| 麻豆精品视频在线观看免费| av一区二区久久| 欧美一区二区三区公司| 国产精品久久三| 无码av免费一区二区三区试看| 国产精品亚洲一区二区三区在线| 一本大道综合伊人精品热热| 日韩视频一区二区三区在线播放| 国产精品久久久久久亚洲毛片 | 色狠狠一区二区| 日韩欧美一卡二卡| 亚洲三级在线看| 国内精品久久久久影院色| 91激情五月电影| 中文一区二区在线观看 | 亚洲欧美色一区| 国产自产2019最新不卡| 欧美午夜寂寞影院| 久久综合色鬼综合色| 欧美综合视频在线观看| 精品三级av在线| 亚洲一区二区视频在线| 国产成人免费视频网站| 日韩午夜激情视频| 亚洲一卡二卡三卡四卡五卡| 福利一区二区在线观看| 欧美刺激脚交jootjob| 亚洲6080在线| 日本精品免费观看高清观看| 国产欧美日韩在线视频| 国产麻豆精品在线观看| 日韩欧美亚洲国产精品字幕久久久 | 老鸭窝一区二区久久精品| 欧日韩精品视频| 亚洲视频1区2区| www.av亚洲| 国产精品丝袜久久久久久app| 国产一区二区不卡在线| 日韩欧美一级二级| 美女一区二区视频| 7777精品伊人久久久大香线蕉完整版 | 日韩一二三区不卡| 亚洲综合色噜噜狠狠| 欧美不卡一区二区三区四区| 亚洲国产视频直播| 欧美性一二三区| 一级女性全黄久久生活片免费| 9人人澡人人爽人人精品|