On Wed, 2005-08-10 at 12:04 -0400, Colin Walters wrote:
> On Fri, 2005-08-05 at 12:16 -0400, Charles Schmidt wrote:
[snip]
> > +               buf = g_malloc (file_size);
> > +
> > +               result = gnome_vfs_read (handle, buf, file_size,
> > NULL);
> 
> Hmm...this is potentially pretty large, and remember GLib will just
> abort() if malloc fails.  Is the GMappedFile or whatever interface to
> mmap() in GLib yet?  We should probably use that.

You could always use g_try_malloc() and return if the allocation was
unsuccessful.

Regards,
Jon Oberheide

-- 
Jon Oberheide <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
rhythmbox-devel mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/rhythmbox-devel

Reply via email to