vb bitmap_line = alloc (&_, T_ARRAY, rgb, length, AC_WRITE);           

if (bitmap_line)
{
  ...
}
else
{
  error (ERR_MEMORY),
  {
    log ("Error: out of memory, trying to allocate %d bytes", length * size_of (rgb))
  };
}
