lua-users home
lua-l archive

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


It was thus said that the Great Philipp Janda once stated:
> Am 27.08.2014 um 23:58 schröbte Sean Conner:
> >It was thus said that the Great Coroutines once stated:
> >
> >>I was off-base when I said mmap() -- I haven't used mmap() often and for
> >>some reason I thought I could take a [page-sized] block of memory and get
> >>an fd from it.  WRONG.  I was really thinking of shm_open().
> >
> >   No, what you want is open_memstream().  It's a POSIX function, so it'll
> >exist on Linux and Mac.
> 
> Actually, `open_memstream` (re-)allocates its own memory buffer and only 
> does output. What you probably mean is `fmemopen` (also POSIX).

  You are right.  I was confused.  fmemopen() is what you (Coroutines) want.

  -spc