docs/api-2.1/stack_8h.html

Sun, 26 Sep 2021 13:34:30 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 26 Sep 2021 13:34:30 +0200
changeset 424
2d6f6cb24132
parent 390
d345541018fa
permissions
-rw-r--r--

add some low level tree function declarations

390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 <head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 <meta name="generator" content="Doxygen 1.8.13"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 <title>ucx: /home/mike/workspace/c/ucx/src/ucx/stack.h File Reference</title>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 <script type="text/javascript" src="jquery.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 <script type="text/javascript" src="dynsections.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 <script type="text/javascript" src="search/searchdata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 <script type="text/javascript" src="search/search.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 </head>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 <body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 <div id="titlearea">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 <table cellspacing="0" cellpadding="0">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 <tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 <tr style="height: 56px;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 <td id="projectalign" style="padding-left: 0.5em;">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 <div id="projectname">ucx
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 <div id="projectbrief">UAP Common Extensions</div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 </tbody>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 <!-- end header part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 <!-- Generated by Doxygen 1.8.13 -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 var searchBox = new SearchBox("searchBox", "search",false,'Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <script type="text/javascript" src="menudata.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <script type="text/javascript" src="menu.js"></script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 <script type="text/javascript">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 $(function() {
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 initMenu('',true,false,'search.php','Search');
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 $(document).ready(function() { init_search(); });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 });
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 </script>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 <div id="main-nav"></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 <!-- window showing the filter options -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 <div id="MSearchSelectWindow"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 onmouseover="return searchBox.OnSearchSelectShow()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 onmouseout="return searchBox.OnSearchSelectHide()"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 onkeydown="return searchBox.OnSearchSelectKey(event)">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 <!-- iframe showing the search results (closed by default) -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 <div id="MSearchResultsWindow">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 <iframe src="javascript:void(0)" frameborder="0"
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 name="MSearchResults" id="MSearchResults">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 </iframe>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 <div id="nav-path" class="navpath">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 <ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 </div><!-- top -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 <div class="header">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 <div class="summary">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 <a href="#nested-classes">Data Structures</a> &#124;
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 <a href="#define-members">Macros</a> &#124;
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 <a href="#func-members">Functions</a> </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 <div class="headertitle">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 <div class="title">stack.h File Reference</div> </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 </div><!--header-->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 <div class="contents">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 <p>Default stack memory allocation implementation.
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 <a href="#details">More...</a></p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 <div class="textblock"><code>#include &quot;<a class="el" href="ucx_8h_source.html">ucx.h</a>&quot;</code><br />
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 <code>#include &quot;<a class="el" href="allocator_8h_source.html">allocator.h</a>&quot;</code><br />
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 <p><a href="stack_8h_source.html">Go to the source code of this file.</a></p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 <table class="memberdecls">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 Data Structures</h2></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUcxStack.html">UcxStack</a></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">UCX stack structure. <a href="structUcxStack.html#details">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structucx__stack__metadata.html">ucx_stack_metadata</a></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Metadata for each UCX stack element. <a href="structucx__stack__metadata.html#details">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 </table><table class="memberdecls">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 Macros</h2></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 <tr class="memitem:a030197051a803e87d5eeac5adb80b15a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a030197051a803e87d5eeac5adb80b15a">ucx_stack_topsize</a>(stack)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 <tr class="memdesc:a030197051a803e87d5eeac5adb80b15a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the top most element. <a href="#a030197051a803e87d5eeac5adb80b15a">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 <tr class="separator:a030197051a803e87d5eeac5adb80b15a"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 <tr class="memitem:a506b82374734ec476d086ddfb561174d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a506b82374734ec476d086ddfb561174d">ucx_stack_pop</a>(stack, dest)&#160;&#160;&#160;<a class="el" href="stack_8h.html#a07ea48f28eab474dcfefbb86fa66ef81">ucx_stack_popn</a>(stack, dest, (size_t)-1)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 <tr class="memdesc:a506b82374734ec476d086ddfb561174d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the top most element from the stack and copies the content to <code> dest</code>, if specified. <a href="#a506b82374734ec476d086ddfb561174d">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 <tr class="separator:a506b82374734ec476d086ddfb561174d"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 <tr class="memitem:a4f7239dbd6c032c56812e370b71c1985"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a4f7239dbd6c032c56812e370b71c1985">ucx_stack_empty</a>(stack)&#160;&#160;&#160;(!(stack)-&gt;top)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 <tr class="memdesc:a4f7239dbd6c032c56812e370b71c1985"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks, if the stack is empty. <a href="#a4f7239dbd6c032c56812e370b71c1985">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 <tr class="separator:a4f7239dbd6c032c56812e370b71c1985"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 <tr class="memitem:a3b761343c6491222604341ebfa443226"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a3b761343c6491222604341ebfa443226">ucx_stack_dim</a>(size, elems)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 <tr class="memdesc:a3b761343c6491222604341ebfa443226"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes a recommended size for the stack memory area. <a href="#a3b761343c6491222604341ebfa443226">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 <tr class="separator:a3b761343c6491222604341ebfa443226"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 </table><table class="memberdecls">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 Functions</h2></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 <tr class="memitem:abaef685df4e7ef95cd7218984a0618fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#abaef685df4e7ef95cd7218984a0618fe">ucx_stack_init</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, char *space, size_t size)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 <tr class="memdesc:abaef685df4e7ef95cd7218984a0618fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes <a class="el" href="structUcxStack.html" title="UCX stack structure. ">UcxStack</a> structure with memory. <a href="#abaef685df4e7ef95cd7218984a0618fe">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111 <tr class="separator:abaef685df4e7ef95cd7218984a0618fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112 <tr class="memitem:af865b416802140f6b6e8ab3626d7d1ac"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#af865b416802140f6b6e8ab3626d7d1ac">ucx_stack_malloc</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, size_t n)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 <tr class="memdesc:af865b416802140f6b6e8ab3626d7d1ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates stack memory. <a href="#af865b416802140f6b6e8ab3626d7d1ac">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 <tr class="separator:af865b416802140f6b6e8ab3626d7d1ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 <tr class="memitem:af85e6f77a8341beb6188f9ae1a8e9f92"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#af85e6f77a8341beb6188f9ae1a8e9f92">ucx_stack_push</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, size_t n, const void *data)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 <tr class="memdesc:af85e6f77a8341beb6188f9ae1a8e9f92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory with <a class="el" href="stack_8h.html#af865b416802140f6b6e8ab3626d7d1ac" title="Allocates stack memory. ">ucx_stack_malloc()</a> and copies the specified data if the allocation was successful. <a href="#af85e6f77a8341beb6188f9ae1a8e9f92">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 <tr class="separator:af85e6f77a8341beb6188f9ae1a8e9f92"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 <tr class="memitem:afdc467524b5e19a9a777c6bc03e17174"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#afdc467524b5e19a9a777c6bc03e17174">ucx_stack_calloc</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, size_t nelem, size_t elsize)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 <tr class="memdesc:afdc467524b5e19a9a777c6bc03e17174"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates an array of stack memory. <a href="#afdc467524b5e19a9a777c6bc03e17174">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 <tr class="separator:afdc467524b5e19a9a777c6bc03e17174"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 <tr class="memitem:a7bb138979191bba138e76ea37488fae2"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a7bb138979191bba138e76ea37488fae2">ucx_stack_pusharr</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, size_t nelem, size_t elsize, const void *data)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 <tr class="memdesc:a7bb138979191bba138e76ea37488fae2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates memory with <a class="el" href="stack_8h.html#afdc467524b5e19a9a777c6bc03e17174" title="Allocates an array of stack memory. ">ucx_stack_calloc()</a> and copies the specified data if the allocation was successful. <a href="#a7bb138979191bba138e76ea37488fae2">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 <tr class="separator:a7bb138979191bba138e76ea37488fae2"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 <tr class="memitem:a0c678f96f6fabab49b2b034a1fe91c3a"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a0c678f96f6fabab49b2b034a1fe91c3a">ucx_stack_realloc</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, void *ptr, size_t n)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 <tr class="memdesc:a0c678f96f6fabab49b2b034a1fe91c3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reallocates memory on the stack. <a href="#a0c678f96f6fabab49b2b034a1fe91c3a">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 <tr class="separator:a0c678f96f6fabab49b2b034a1fe91c3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 <tr class="memitem:aabd55c14a3866b3782ba324f4d8b4c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#aabd55c14a3866b3782ba324f4d8b4c41">ucx_stack_free</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, void *ptr)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 <tr class="memdesc:aabd55c14a3866b3782ba324f4d8b4c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees memory on the stack. <a href="#aabd55c14a3866b3782ba324f4d8b4c41">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 <tr class="separator:aabd55c14a3866b3782ba324f4d8b4c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 <tr class="memitem:a07ea48f28eab474dcfefbb86fa66ef81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a07ea48f28eab474dcfefbb86fa66ef81">ucx_stack_popn</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack, void *dest, size_t n)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 <tr class="memdesc:a07ea48f28eab474dcfefbb86fa66ef81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the top most element from the stack and copies the content to <code> dest</code>. <a href="#a07ea48f28eab474dcfefbb86fa66ef81">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 <tr class="separator:a07ea48f28eab474dcfefbb86fa66ef81"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 <tr class="memitem:a53cd2c7743dc8ad9cbd35ade0b4873e7"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stack_8h.html#a53cd2c7743dc8ad9cbd35ade0b4873e7">ucx_stack_avail</a> (<a class="el" href="structUcxStack.html">UcxStack</a> *stack)</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 <tr class="memdesc:a53cd2c7743dc8ad9cbd35ade0b4873e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the remaining available memory on the specified stack. <a href="#a53cd2c7743dc8ad9cbd35ade0b4873e7">More...</a><br /></td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 <tr class="separator:a53cd2c7743dc8ad9cbd35ade0b4873e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 <div class="textblock"><p>Default stack memory allocation implementation. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 <dl class="section author"><dt>Author</dt><dd>Mike Becker </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 <dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 Olaf Wintermann </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 </div><h2 class="groupheader">Macro Definition Documentation</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 <a id="a3b761343c6491222604341ebfa443226"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 <h2 class="memtitle"><span class="permalink"><a href="#a3b761343c6491222604341ebfa443226">&#9670;&nbsp;</a></span>ucx_stack_dim</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 <td class="memname">#define ucx_stack_dim</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 <td class="paramname">size, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
154 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
155 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159 <td class="paramname">elems&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
162 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
165 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 <b>Value:</b><div class="fragment"><div class="line">(size+<span class="keyword">sizeof</span>(<span class="keyword">struct </span><a class="code" href="structucx__stack__metadata.html">ucx_stack_metadata</a>) * \</div><div class="line"> (elems + 1))</div><div class="ttc" id="structucx__stack__metadata_html"><div class="ttname"><a href="structucx__stack__metadata.html">ucx_stack_metadata</a></div><div class="ttdoc">Metadata for each UCX stack element. </div><div class="ttdef"><b>Definition:</b> stack.h:69</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 </div><!-- fragment -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 <p>Computes a recommended size for the stack memory area. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 <p>Note, that reallocations have not been taken into account, so you might need to reserve twice as much memory to allow many reallocations.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 <tr><td class="paramname">size</td><td>the approximate payload </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 <tr><td class="paramname">elems</td><td>the approximate count of element allocations </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 <dl class="section return"><dt>Returns</dt><dd>a recommended size for the stack space based on the information provided </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
183 <a id="a4f7239dbd6c032c56812e370b71c1985"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
184 <h2 class="memtitle"><span class="permalink"><a href="#a4f7239dbd6c032c56812e370b71c1985">&#9670;&nbsp;</a></span>ucx_stack_empty</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
185
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
186 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
187 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
188 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
189 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
190 <td class="memname">#define ucx_stack_empty</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
191 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
192 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
193 <td class="paramname">stack</td><td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
194 <td>&#160;&#160;&#160;(!(stack)-&gt;top)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
195 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
196 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
199 <p>Checks, if the stack is empty. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
200 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
201 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
202 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
203 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
204 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
205 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
206 <dl class="section return"><dt>Returns</dt><dd>nonzero, if the stack is empty, zero otherwise </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
207
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
208 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
209 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
210 <a id="a506b82374734ec476d086ddfb561174d"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
211 <h2 class="memtitle"><span class="permalink"><a href="#a506b82374734ec476d086ddfb561174d">&#9670;&nbsp;</a></span>ucx_stack_pop</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
212
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
213 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
214 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
215 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217 <td class="memname">#define ucx_stack_pop</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
218 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
220 <td class="paramname">stack, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
226 <td class="paramname">dest&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231 <td></td><td>&#160;&#160;&#160;<a class="el" href="stack_8h.html#a07ea48f28eab474dcfefbb86fa66ef81">ucx_stack_popn</a>(stack, dest, (size_t)-1)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
234 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
235
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 <p>Removes the top most element from the stack and copies the content to <code> dest</code>, if specified. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 <p>Use <a class="el" href="stack_8h.html#a030197051a803e87d5eeac5adb80b15a" title="Returns the size of the top most element. ">ucx_stack_topsize()</a># to get the amount of memory that must be available at the location of <code>dest</code>.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
238 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
239 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
240 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
241 <tr><td class="paramname">dest</td><td>the location where the contents shall be written to, or <code> NULL</code>, if the element shall only be removed. </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
242 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
243 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
244 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
245 <dl class="section see"><dt>See also</dt><dd><a class="el" href="stack_8h.html#aabd55c14a3866b3782ba324f4d8b4c41" title="Frees memory on the stack. ">ucx_stack_free</a> </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
246 <dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
247 <a class="el" href="stack_8h.html#a07ea48f28eab474dcfefbb86fa66ef81" title="Removes the top most element from the stack and copies the content to dest. ">ucx_stack_popn</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
248
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
249 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
250 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
251 <a id="a030197051a803e87d5eeac5adb80b15a"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
252 <h2 class="memtitle"><span class="permalink"><a href="#a030197051a803e87d5eeac5adb80b15a">&#9670;&nbsp;</a></span>ucx_stack_topsize</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
253
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258 <td class="memname">#define ucx_stack_topsize</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
259 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 <td class="paramtype">&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 <td class="paramname">stack</td><td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266 <b>Value:</b><div class="fragment"><div class="line">((stack)-&gt;top ? ((<span class="keyword">struct</span> <a class="code" href="structucx__stack__metadata.html">ucx_stack_metadata</a>*)\</div><div class="line"> (stack)-&gt;top - 1)-&gt;size : 0)</div><div class="ttc" id="structucx__stack__metadata_html"><div class="ttname"><a href="structucx__stack__metadata.html">ucx_stack_metadata</a></div><div class="ttdoc">Metadata for each UCX stack element. </div><div class="ttdef"><b>Definition:</b> stack.h:69</div></div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 </div><!-- fragment -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268 <p>Returns the size of the top most element. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 <dl class="section return"><dt>Returns</dt><dd>the size of the top most element </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
276
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 <h2 class="groupheader">Function Documentation</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 <a id="a53cd2c7743dc8ad9cbd35ade0b4873e7"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 <h2 class="memtitle"><span class="permalink"><a href="#a53cd2c7743dc8ad9cbd35ade0b4873e7">&#9670;&nbsp;</a></span>ucx_stack_avail()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
284 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
285 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
286 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
287 <td class="memname">size_t ucx_stack_avail </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
288 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
290 <td class="paramname"><em>stack</em></td><td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
291 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
292 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
293 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
294 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
295
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
296 <p>Returns the remaining available memory on the specified stack. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
298 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
299 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
300 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
301 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
302 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 <dl class="section return"><dt>Returns</dt><dd>the remaining available memory </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
304
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
306 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
307 <a id="afdc467524b5e19a9a777c6bc03e17174"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
308 <h2 class="memtitle"><span class="permalink"><a href="#afdc467524b5e19a9a777c6bc03e17174">&#9670;&nbsp;</a></span>ucx_stack_calloc()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
309
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
310 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 <td class="memname">void* ucx_stack_calloc </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 <td class="paramname"><em>nelem</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
324 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
325 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
328 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
329 <td class="paramname"><em>elsize</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
330 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 <p>Allocates an array of stack memory. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 <p>The content of the allocated memory is set to zero.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344 <tr><td class="paramname">nelem</td><td>amount of elements to allocate </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 <tr><td class="paramname">elsize</td><td>amount of memory per element </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
347 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
348 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
349 <dl class="section return"><dt>Returns</dt><dd>a pointer to the allocated memory </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
350 <dl class="section see"><dt>See also</dt><dd><a class="el" href="allocator_8h.html#a2c0aba4221c1ac6801f03ed799f15b12" title="A function pointer to the allocators calloc() function. ">ucx_allocator_calloc()</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
351
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
353 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
354 <a id="aabd55c14a3866b3782ba324f4d8b4c41"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
355 <h2 class="memtitle"><span class="permalink"><a href="#aabd55c14a3866b3782ba324f4d8b4c41">&#9670;&nbsp;</a></span>ucx_stack_free()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
356
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
357 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
358 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
359 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
360 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
361 <td class="memname">void ucx_stack_free </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
369 <td class="paramtype">void *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 <td class="paramname"><em>ptr</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
379
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
380 <p>Frees memory on the stack. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
381 <p>Freeing stack memory behaves in a special way.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 <p>If the element, that should be freed, is the top most element of the stack, it is removed from the stack. Otherwise it is marked as freed. Marked elements are removed, when they become the top most elements of the stack.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 <tr><td class="paramname">ptr</td><td>a pointer to the memory that shall be freed </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
390
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
392 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
393 <a id="abaef685df4e7ef95cd7218984a0618fe"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 <h2 class="memtitle"><span class="permalink"><a href="#abaef685df4e7ef95cd7218984a0618fe">&#9670;&nbsp;</a></span>ucx_stack_init()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
395
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
396 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
399 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
400 <td class="memname">void ucx_stack_init </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
404 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 <td class="paramtype">char *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 <td class="paramname"><em>space</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
410 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
411 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
415 <td class="paramname"><em>size</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
416 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
417 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
418 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
419 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
420 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
421 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
423 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
424
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
425 <p>Initializes <a class="el" href="structUcxStack.html" title="UCX stack structure. ">UcxStack</a> structure with memory. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
428 <tr><td class="paramname">stack</td><td>a pointer to an uninitialized stack structure </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
429 <tr><td class="paramname">space</td><td>the memory area that shall be managed </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
430 <tr><td class="paramname">size</td><td>size of the memory area </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
431 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
434 <dl class="section return"><dt>Returns</dt><dd>a new <a class="el" href="structUcxStack.html" title="UCX stack structure. ">UcxStack</a> structure </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
435
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438 <a id="af865b416802140f6b6e8ab3626d7d1ac"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
439 <h2 class="memtitle"><span class="permalink"><a href="#af865b416802140f6b6e8ab3626d7d1ac">&#9670;&nbsp;</a></span>ucx_stack_malloc()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
441 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
442 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
443 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
444 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
445 <td class="memname">void* ucx_stack_malloc </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
448 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
452 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
453 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 <td class="paramname"><em>n</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
455 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
464 <p>Allocates stack memory. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
467 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
468 <tr><td class="paramname">n</td><td>amount of memory to allocate </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
469 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
470 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
471 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
472 <dl class="section return"><dt>Returns</dt><dd>a pointer to the allocated memory or <code>NULL</code> on stack overflow </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
473 <dl class="section see"><dt>See also</dt><dd><a class="el" href="allocator_8h.html#a29f0f6a23a70db3b60635cd6dc384473" title="A function pointer to the allocators malloc() function. ">ucx_allocator_malloc()</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
474
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
475 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
476 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
477 <a id="a07ea48f28eab474dcfefbb86fa66ef81"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
478 <h2 class="memtitle"><span class="permalink"><a href="#a07ea48f28eab474dcfefbb86fa66ef81">&#9670;&nbsp;</a></span>ucx_stack_popn()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
479
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
480 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
481 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
483 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
484 <td class="memname">void ucx_stack_popn </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
485 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
486 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
487 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
488 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
489 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
490 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
491 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
492 <td class="paramtype">void *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
493 <td class="paramname"><em>dest</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
494 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
495 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
497 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
498 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
499 <td class="paramname"><em>n</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
500 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
502 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
503 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 <p>Removes the top most element from the stack and copies the content to <code> dest</code>. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
510 <p>This function copies at most <code>n</code> bytes to the destination, but the element is always freed as a whole. If the element was larger than <code>n</code>, the remaining data is lost.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
511 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
514 <tr><td class="paramname">dest</td><td>the location where the contents shall be written to </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515 <tr><td class="paramname">n</td><td>copies at most n bytes to <code>dest</code> </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
519 <dl class="section see"><dt>See also</dt><dd><a class="el" href="stack_8h.html#a506b82374734ec476d086ddfb561174d" title="Removes the top most element from the stack and copies the content to dest, if specified. ">ucx_stack_pop</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
520
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
521 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
522 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
523 <a id="af85e6f77a8341beb6188f9ae1a8e9f92"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
524 <h2 class="memtitle"><span class="permalink"><a href="#af85e6f77a8341beb6188f9ae1a8e9f92">&#9670;&nbsp;</a></span>ucx_stack_push()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
525
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
527 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 <td class="memname">void* ucx_stack_push </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
537 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 <td class="paramname"><em>n</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 <td class="paramtype">const void *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545 <td class="paramname"><em>data</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
552 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
553 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
554
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 <p>Allocates memory with <a class="el" href="stack_8h.html#af865b416802140f6b6e8ab3626d7d1ac" title="Allocates stack memory. ">ucx_stack_malloc()</a> and copies the specified data if the allocation was successful. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
557 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
558 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559 <tr><td class="paramname">n</td><td>amount of memory to allocate </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 <tr><td class="paramname">data</td><td>a pointer to the data to copy </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
561 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
562 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
563 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
564 <dl class="section return"><dt>Returns</dt><dd>a pointer to the allocated memory </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
565 <dl class="section see"><dt>See also</dt><dd><a class="el" href="stack_8h.html#af865b416802140f6b6e8ab3626d7d1ac" title="Allocates stack memory. ">ucx_stack_malloc</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 <a id="a7bb138979191bba138e76ea37488fae2"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 <h2 class="memtitle"><span class="permalink"><a href="#a7bb138979191bba138e76ea37488fae2">&#9670;&nbsp;</a></span>ucx_stack_pusharr()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 <td class="memname">void* ucx_stack_pusharr </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
578 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
579 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 <td class="paramname"><em>nelem</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
587 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
588 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
589 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
591 <td class="paramname"><em>elsize</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
592 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
593 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
594 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
595 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
596 <td class="paramtype">const void *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
597 <td class="paramname"><em>data</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
598 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
599 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
600 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
601 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
602 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
603 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
604 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
605 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
606
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607 <p>Allocates memory with <a class="el" href="stack_8h.html#afdc467524b5e19a9a777c6bc03e17174" title="Allocates an array of stack memory. ">ucx_stack_calloc()</a> and copies the specified data if the allocation was successful. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
609 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
610 <tr><td class="paramname">stack</td><td>a pointer to the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 <tr><td class="paramname">nelem</td><td>amount of elements to allocate </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 <tr><td class="paramname">elsize</td><td>amount of memory per element </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 <tr><td class="paramname">data</td><td>a pointer to the data </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
614 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
615 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
616 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
617 <dl class="section return"><dt>Returns</dt><dd>a pointer to the allocated memory </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 <dl class="section see"><dt>See also</dt><dd><a class="el" href="stack_8h.html#afdc467524b5e19a9a777c6bc03e17174" title="Allocates an array of stack memory. ">ucx_stack_calloc</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
619
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
620 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
621 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
622 <a id="a0c678f96f6fabab49b2b034a1fe91c3a"></a>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
623 <h2 class="memtitle"><span class="permalink"><a href="#a0c678f96f6fabab49b2b034a1fe91c3a">&#9670;&nbsp;</a></span>ucx_stack_realloc()</h2>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
624
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
625 <div class="memitem">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
626 <div class="memproto">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627 <table class="memname">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
629 <td class="memname">void* ucx_stack_realloc </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
630 <td>(</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
631 <td class="paramtype"><a class="el" href="structUcxStack.html">UcxStack</a> *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 <td class="paramname"><em>stack</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
633 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
637 <td class="paramtype">void *&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
638 <td class="paramname"><em>ptr</em>, </td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
639 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
640 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
641 <td class="paramkey"></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
643 <td class="paramtype">size_t&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
644 <td class="paramname"><em>n</em>&#160;</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
645 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
646 <tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
647 <td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
648 <td>)</td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
649 <td></td><td></td>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 </tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
651 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 </div><div class="memdoc">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
653
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
654 <p>Reallocates memory on the stack. </p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
655 <p>Shrinking memory is always safe. Extending memory can be very expensive.</p>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
656 <dl class="params"><dt>Parameters</dt><dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
657 <table class="params">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
658 <tr><td class="paramname">stack</td><td>the stack </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
659 <tr><td class="paramname">ptr</td><td>a pointer to the memory that shall be reallocated </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
660 <tr><td class="paramname">n</td><td>the new size of the memory </td></tr>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
661 </table>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
662 </dd>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
663 </dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
664 <dl class="section return"><dt>Returns</dt><dd>a pointer to the new location of the memory </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
665 <dl class="section see"><dt>See also</dt><dd><a class="el" href="allocator_8h.html#a6d7cf038a806e327c5da37321d04e426" title="A function pointer to the allocators realloc() function. ">ucx_allocator_realloc()</a> </dd></dl>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
666
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
668 </div>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
669 </div><!-- contents -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
670 <!-- start footer part -->
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671 <hr class="footer"/><address class="footer"><small>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 <img class="footer" src="doxygen.png" alt="doxygen"/>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 </a> 1.8.13
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
675 </small></address>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676 </body>
d345541018fa starts ucx 3.0 development
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 </html>

mercurial