mempool-datastack.c revision f94332a6f35455f112cb7dfccfff369fbc55d8cc
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen mempool-data-stack.c : Memory pool wrapper for data stack
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen Copyright (c) 2002 Timo Sirainen
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen Permission is hereby granted, free of charge, to any person obtaining
af49da69a12b5383b89c7b2fa574c2a85b9ca310Timo Sirainen a copy of this software and associated documentation files (the
af49da69a12b5383b89c7b2fa574c2a85b9ca310Timo Sirainen "Software"), to deal in the Software without restriction, including
fea53234804e75bb8f0b87ab0a0b1cc1c9770031Timo Sirainen without limitation the rights to use, copy, modify, merge, publish,
fea53234804e75bb8f0b87ab0a0b1cc1c9770031Timo Sirainen distribute, sublicense, and/or sell copies of the Software, and to
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen permit persons to whom the Software is furnished to do so, subject to
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen the following conditions:
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen The above copyright notice and this permission notice shall be
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainen included in all copies or substantial portions of the Software.
33750ba29b605a925af5aed58d3f3735422b1e25Phil Carmody THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
33750ba29b605a925af5aed58d3f3735422b1e25Phil Carmody OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33750ba29b605a925af5aed58d3f3735422b1e25Phil Carmody MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33750ba29b605a925af5aed58d3f3735422b1e25Phil Carmody IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
40ac30b9267c710f5fcdd4b2f6bcd7718a631843Timo Sirainen CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
518781a0a4ba2403f23dbadda445b107fbb87daaPhil Carmody TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
8562f8de469e87ad4104747cebec6b133fa3a0f5Timo Sirainen SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainenstatic void pool_data_stack_unref(pool_t pool);
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainenstatic void *pool_data_stack_malloc(pool_t pool, size_t size);
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainenstatic void pool_data_stack_free(pool_t pool, void *mem);
518781a0a4ba2403f23dbadda445b107fbb87daaPhil Carmodystatic void *pool_data_stack_realloc(pool_t pool, void *mem,
de62ce819d59a529530da4b57be1b8d6dad13d6bTimo Sirainenstatic void pool_data_stack_clear(pool_t pool);
void *new_mem;
return mem;
return mem;