lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Monday 11, Luiz Henrique de Figueiredo wrote:
> > The allocator will call sbrk() and mmap().
>
> The allocator is not part of Lua: it's supplied by the user. On the other
> hand, the auxlib does provide an allocator that uses realloc and free.

You could mmap a large block of memory before turning on the seccomp flag.  
Then use a custom allocator like dlmalloc [1] to provide realloc/free support 
to Lua.  dlmalloc can be configured to allocate memory out of a fixed block 
of memory.

1. http://gee.cs.oswego.edu/pub/misc/malloc.c

-- 
Robert G. Jakabosky