[Flex-help] how to set a memory allocator for yyalloc
flex is a tool for generating scanners
Brought to you by:
wlestes
From: <ga...@si...> - 2015-08-16 02:36:05
|
Hi all, I am using bison + flex to write a sql parser now. I get some performance problem: the cpu cost of the parser is high, almost 3% of total CPU (using perf top to check), under the test of 64 concurrency sysbench oltp-simple test. I check the generate c source file of flex and bison, and find it use malloc and free to get and release memory for each sql in the yyalloc function. Is it possible for me to set a memory allocator, which will use a local buffer, for bison+flex ? Best regards! Dennis |