[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Linux and seccomp and Lua, or: List of implicit system calls?
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Mon, 11 May 2009 04:29:04 -0700
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