From 7f6084b3b7b207233f78a14b0b56918f0e02d3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Wed, 30 Nov 2011 13:04:49 +0000 Subject: [PATCH] isupport for threads aanda malloc --- OPTYap/opt.config.h | 4 +++- OPTYap/opt.structs.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPTYap/opt.config.h b/OPTYap/opt.config.h index 4e28b927c..cc0664925 100644 --- a/OPTYap/opt.config.h +++ b/OPTYap/opt.config.h @@ -20,7 +20,9 @@ /****************************************************************************************** ** use shared pages memory alloc scheme for OPTYap data structures? (optional) ** ******************************************************************************************/ -/* #define USE_PAGES_MALLOC 1 */ +#ifdef THREADS +#define USE_PAGES_MALLOC 1 +#endif diff --git a/OPTYap/opt.structs.h b/OPTYap/opt.structs.h index 9c5fc8719..471f067ab 100644 --- a/OPTYap/opt.structs.h +++ b/OPTYap/opt.structs.h @@ -79,7 +79,7 @@ typedef struct page_header { struct pages { #ifdef USE_PAGES_MALLOC -#ifdef YAPOR +#if defined(YAPOR) || defined(THREADS) lockvar lock; #endif /* YAPOR */ int structs_per_page;