[pcre-dev] [Bug 1362] JIT Exec Allocator never frees last em…

Top Pagina
Delete this message
Auteur: Zoltan Herczeg
Datum:  
Aan: pcre-dev
Onderwerp: [pcre-dev] [Bug 1362] JIT Exec Allocator never frees last empty chunk
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1362

Zoltan Herczeg <hzmester@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hzmester@???





--- Comment #1 from Zoltan Herczeg <hzmester@???> 2013-06-03 07:34:41 ---
Hi,

thank you for the report. You are right, the allocator works that way, and it
is its intended behavior. We need an allocator, since the system can only
allocate pages, so if you allocate 1 byte of memory, that wastes a 4K or 16K
block. That is too much in my opinion. I also didn't want a complex allocator
because of security reasons (the sljit compiler is built around simple yet
powerful principles).

However, you are totally right: freeing all memory sometimes is desired. I will
add a gc like pcre[16|32]_jit_free_unused_memory(void) function, which
guarantees, if no pattern is compiled at a moment, all memory is freed.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email