ucx/stack.c

Tue, 19 Sep 2017 15:32:53 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 19 Sep 2017 15:32:53 +0200
changeset 249
fb21858ad8da
parent 225
a1a068c2c4ef
child 250
b7d1317b138e
permissions
-rw-r--r--

removes unusedFunction check for now (we may add it later to get a further indicator for test coverage)

13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 /*
103
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 *
225
a1a068c2c4ef updates documenting comments
Mike Becker <universe@uap-core.de>
parents: 192
diff changeset
4 * Copyright 2016 Olaf Wintermann. All rights reserved.
103
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
5 *
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
6 * Redistribution and use in source and binary forms, with or without
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
7 * modification, are permitted provided that the following conditions are met:
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
8 *
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
10 * notice, this list of conditions and the following disclaimer.
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
11 *
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
14 * documentation and/or other materials provided with the distribution.
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
15 *
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
08018864fb91 added license and copyright notice to all files
Mike Becker <universe@uap-core.de>
parents: 95
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 */
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
29 #include "stack.h"
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 #include <string.h>
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
32 static size_t ucx_stack_align(size_t n) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
33 int align = n % sizeof(void*);
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
34 if (align) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
35 n += sizeof(void*) - align;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
36 }
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
37 return n;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
38 }
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
39
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
40 void ucx_stack_init(UcxStack *stack, char* space, size_t size) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
41 stack->size = size - size % sizeof(void*);
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
42 stack->space = space;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
43 stack->top = NULL;
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
44
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
45 stack->allocator.pool = stack;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
46 stack->allocator.malloc = (ucx_allocator_malloc) ucx_stack_malloc;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
47 stack->allocator.calloc = (ucx_allocator_calloc) ucx_stack_calloc;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
48 stack->allocator.realloc = (ucx_allocator_realloc) ucx_stack_realloc;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
49 stack->allocator.free = (ucx_allocator_free) ucx_stack_free;
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
50 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
51
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
52 void *ucx_stack_malloc(UcxStack *stack, size_t n) {
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
53
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
54 if (ucx_stack_avail(stack) < ucx_stack_align(n)) {
158
81d580042da1 Added allocator to mempool struct + fixed suncc.mk
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 141
diff changeset
55 return NULL;
135
a0aa1c15f46b documented mempool + some fixes
Mike Becker <universe@uap-core.de>
parents: 131
diff changeset
56 } else {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
57 char *prev = stack->top;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
58 if (stack->top) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
59 stack->top += ucx_stack_align(ucx_stack_topsize(stack));
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
60 } else {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
61 stack->top = stack->space;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
62 }
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
63
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
64 ((struct ucx_stack_metadata*)stack->top)->prev = prev;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
65 ((struct ucx_stack_metadata*)stack->top)->size = n;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
66 stack->top += sizeof(struct ucx_stack_metadata);
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
67
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
68 return stack->top;
15
2dc4c688c262 fixed mpool compiler warnings
Mike Becker <universe@uap-core.de>
parents: 14
diff changeset
69 }
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
72 void *ucx_stack_calloc(UcxStack *stack, size_t nelem, size_t elsize) {
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
73 void *mem = ucx_stack_malloc(stack, nelem*elsize);
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
74 memset(mem, 0, nelem*elsize);
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
75 return mem;
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
78 void *ucx_stack_realloc(UcxStack *stack, void *ptr, size_t n) {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
79 if (ptr == stack->top) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
80 if (stack->size - (stack->top - stack->space) < ucx_stack_align(n)) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
81 return NULL;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
82 } else {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
83 ((struct ucx_stack_metadata*)stack->top - 1)->size = n;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
84 return ptr;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
85 }
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
86 } else {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
87 if (ucx_stack_align(((struct ucx_stack_metadata*)ptr - 1)->size) <
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
88 ucx_stack_align(n)) {
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
89 void *nptr = ucx_stack_malloc(stack, n);
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
90 if (nptr) {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
91 memcpy(nptr, ptr, n);
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
92 ucx_stack_free(stack, ptr);
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
93
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
94 return nptr;
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
95 } else {
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
96 return NULL;
14
b78e174b6814 Fixed realloc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
97 }
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
98 } else {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
99 ((struct ucx_stack_metadata*)ptr - 1)->size = n;
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
100 return ptr;
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
105 void ucx_stack_free(UcxStack *stack, void *ptr) {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
106 if (ptr == stack->top) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
107 stack->top = ((struct ucx_stack_metadata*) stack->top - 1)->prev;
182
998bf7c643b4 merged sstrcat function
Mike Becker <universe@uap-core.de>
parents: 177
diff changeset
108 } else {
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
109 struct ucx_stack_metadata *next = (struct ucx_stack_metadata*)(
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
110 (char*)ptr +
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
111 ucx_stack_align(((struct ucx_stack_metadata*) ptr - 1)->size)
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
112 );
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
113 next->prev = ((struct ucx_stack_metadata*) ptr - 1)->prev;
113
8693d7874773 added mempool allocator
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 103
diff changeset
114 }
8693d7874773 added mempool allocator
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 103
diff changeset
115 }
8693d7874773 added mempool allocator
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 103
diff changeset
116
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
117 void ucx_stack_popn(UcxStack *stack, void *dest, size_t n) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
118 if (ucx_stack_empty(stack)) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
119 return;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
120 }
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
121
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
122 size_t len = ucx_stack_topsize(stack);
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
123 if (len > n) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
124 len = n;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
125 }
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
126
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
127 memcpy(dest, stack->top, len);
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
128
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
129 ucx_stack_free(stack, stack->top);
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130 }
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131
185
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
132 size_t ucx_stack_avail(UcxStack *stack) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
133 size_t avail = ((stack->top ? (stack->size
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
134 - (stack->top - stack->space)
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
135 - ucx_stack_align(ucx_stack_topsize(stack)))
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
136 : stack->size));
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
137
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
138 if (avail > sizeof(struct ucx_stack_metadata)) {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
139 return avail - sizeof(struct ucx_stack_metadata);
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
140 } else {
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
141 return 0;
a48428642b4e added stack implementation + added g++ config and added some fixes for C++
Mike Becker <universe@uap-core.de>
parents: 182
diff changeset
142 }
13
98ac89e3aa37 Added mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
143 }

mercurial