[plt-scheme] What happens if out of memory

From: Chihiro Kuraya (rxqvw at yahoo.co.jp)
Date: Sat Jun 11 21:42:40 EDT 2005

Eli Barzilay <eli at barzilay.org> wrote:
> On Jun 11, Chihiro Kuraya wrote:
> > It seems there is no description in PLT documents about what happens
> > if memory allocation function failes without
> > scheme_malloc_fail_ok().
> The InsideMz manual says:
>   void *scheme_malloc_fail_ok(void *(*mallocf)(size_t size), size_t size)
>   Attempts to allocate size bytes using mallocf. If the allocation
>   fails, the exn:misc:out-of-memory exception is raised.

Yes, I read this.

But the thing I want to know is what will happen or 
what value will be returned, if allocation function such as 
scheme_malloc fails if I DO NOT wrap the function 
with scheme_malloc_fail_ok.

NULL will be returned ?

Chihiro Kuraya
Save the earth

Posted on the users mailing list.