Faststack memory alloc is configure option now;
This commit is contained in:
parent
2001a4288d
commit
807f126769
@ -23,6 +23,13 @@ AS_IF([test "x$enable_build_examples" = "xyes"], [
|
|||||||
AC_DEFINE([BUILD_EXAMPLES], 1, [build of examples enabled])
|
AC_DEFINE([BUILD_EXAMPLES], 1, [build of examples enabled])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([faststack_alloc],
|
||||||
|
AS_HELP_STRING([--enable-faststack-alloc], [Use faststack thread-safe alloc within parser]))
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_faststack_alloc" = "xyes"], [
|
||||||
|
AC_DEFINE([USE_FASTSTACK_ALLOC], 1, [using faststack allocation within parser])
|
||||||
|
])
|
||||||
|
|
||||||
AC_OUTPUT([
|
AC_OUTPUT([
|
||||||
Makefile
|
Makefile
|
||||||
lib/libsexpr.pc
|
lib/libsexpr.pc
|
||||||
|
@ -40,6 +40,12 @@ LA-CC-04-094
|
|||||||
#include <sexpr/sexp.h>
|
#include <sexpr/sexp.h>
|
||||||
#include <sexpr/faststack.h>
|
#include <sexpr/faststack.h>
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
#ifndef USE_FASTSTACK_ALLOC
|
||||||
|
#define _NO_MEMORY_MANAGEMENT_ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* we need a locks in this case and we don't have ability to change API */
|
/* we need a locks in this case and we don't have ability to change API */
|
||||||
#ifndef _NO_MEMORY_MANAGEMENT_
|
#ifndef _NO_MEMORY_MANAGEMENT_
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user