[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory allocation
From: |
Eli Zaretskii |
Subject: |
Re: memory allocation |
Date: |
Tue, 30 Apr 2013 05:33:55 +0300 |
> From: Paul Smith <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, "address@hidden" <address@hidden>
> Date: Mon, 29 Apr 2013 16:16:40 -0400
>
> It's probably a good idea for make to provide a "gmk_free()" function
> that will free memory returned to the plugin when it calls gmk_*()
> functions such as gmk_expand(). Is that sufficient to deal with this
> problem?
Yes, I think so.
> Suppose, for example, we enhanced gmk_expand() to take a buffer and a
> plugin invoked:
>
> gmk_expand(buf, buflen, "$(info expanding) $(FOO)");
>
> This will return the expansion of the FOO variable, but it will ALSO
> print "expanding" as the result of calling the info function. Now
> suppose that the result of expanding $(FOO) was too large to fit into
> buf, so the function returns the length needed and the plugin
> reallocates the buffer to be large enough and re-invokes gmk_expand()...
> now it will print "expanding" AGAIN.
This could be solved, but I think providing gmk_free is much simpler
and will suffice.
- Re: dynamic object searching (was: Re: Dynamic objects), (continued)
- Re: dynamic object searching (was: Re: Dynamic objects), Tim Murphy, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), David Boyce, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), Eli Zaretskii, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), Tim Murphy, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), Eli Zaretskii, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), Paul Smith, 2013/04/30
- Re: dynamic object searching (was: Re: Dynamic objects), Tim Murphy, 2013/04/30
- Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82), Paul Smith, 2013/04/29
- Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82), Tim Murphy, 2013/04/29
- memory allocation (was: Re: Dynamic objects), Paul Smith, 2013/04/29
- Re: memory allocation,
Eli Zaretskii <=
- Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82), Eli Zaretskii, 2013/04/29
- Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82), Eli Zaretskii, 2013/04/29
Message not available
- Re: .ONESEHLL not working as expected in 3.82, Eli Zaretskii, 2013/04/28
- Re: .ONESEHLL not working as expected in 3.82, Paul Smith, 2013/04/28
- Re: .ONESEHLL not working as expected in 3.82, Eli Zaretskii, 2013/04/28
- Re: .ONESEHLL not working as expected in 3.82, Paul Smith, 2013/04/28
- Re: .ONESEHLL not working as expected in 3.82, Eli Zaretskii, 2013/04/28
Re: .ONESEHLL not working as expected in 3.82, Eli Zaretskii, 2013/04/29