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

Re: webkit-1.8.0-2: Patches for review



On Mon, 2012-04-16 at 17:43 +0200, Samuel Thibault wrote:
> Svante Signell, le Mon 16 Apr 2012 17:38:03 +0200, a écrit :
> > Managed to build webkit with 2G of RAM, and 2.6G of swap. Total disk
> > size around 10G. The files libwebkitgtk-1.0.so.0.13.1 and
> > libwebkitgtk-3.0.so.0.13.1 are around 1G each! (unstripped) Couldn't
> > these libraries be made smaller (modularized??)
> 
> That's the "greatness" of the web at work :/
> More seriously, see #664810.
> 
> > -    static char readLinkBuffer[PATH_MAX];
> 
> Don't we already build with PATH_MAX just set to 1024?

No, doesn't look like it (from the ChangeLog):
2010-02-15  Emilio Pozuelo Monfort  <pochu27@gmail.com>

        Reviewed by Gustavo Noronha Silva.

        [GTK] Fails to build on GNU/Hurd because of PATH_MAX usage
        https://bugs.webkit.org/show_bug.cgi?id=34920

        Use dynamic allocation instead of fixed PATH_MAX size buffers to
        fix the build on GNU/Hurd, where PATH_MAX is undefined.

        * tests/testmimehandling.c:
        (main):
        * tests/testwebview.c:
        (main):

> > Problem with the patch is that the allocated string cannot easily be
> > freed:
> 
> You mean the string allocated in getCurrentExecutablePath()?  It's fine
> to keep it allocated all the time. Just make sure to store the pointer
> in a static variable, to be able to reuse the buffer next time the
> function is called.

Adding static to the CString definition or adding static when
allocating, like: static CString path = getCurrentExecutablePath();


Reply to: