[Geany-Devel] About Malloc memory for each tab?

Pengfei Sun shaotian330 at xxxxx
Sun Oct 25 15:42:51 UTC 2015


Hi Matthew,

Thanks for your explanation about the process of page switch. It is very
helpful for me. I want to recognize all malloc or new memory allocation
functions related with one tab page. I hope to log all this memory
allocation functions information related with this one tab no any other
tabs. So I need one concrete identification for each tab. I will look at
GtkNotebook widget.

Best Regards,
Pengfei

On Fri, Oct 23, 2015 at 8:30 PM, Matthew Brush <mbrush at codebrainz.ca> wrote:

> On 15-10-23 09:21 AM, Pengfei Sun wrote:
>
>> Hi Lex,
>>
>> I have one question about tab switch in the geany. I know the different
>> tab
>> has different doc->id. I think there is only one thread which manages all
>> tabs, right?  I wonder when we switch different tabs to edit the document.
>> How does geany manage or recognize different tabs? g_main_context_check
>> will be called in g_main_loop_run. Whether the data structure GMainContext
>> will include some information which can recognize the different tab?
>>
>>
> Hi,
>
> I know you weren't addressing me, but you might want to look into GTK+,
> the event-driven GUI toolkit Geany uses. When user changes a tab, the
> GtkNotebook widget emits a signal telling Geany about the event, and then
> Geany asks the GtkNotebook for the widget contained in the selected tab
> page, which (eventually) contains the Scintilla widget, via the GTK+ widget
> hierarchy.
>
> If you're trying to track down the control flow via GDB or other debugger,
> the event-driven model is going to send you on a wild goose chase through
> hell :)
>
> FWIW, doc->id is basically not very useful, it just tells the index into
> some internal array of GeanyDocument objects, but is not unique to each
> document/tab per se (it gets recycled for new documents and such).
>
> Cheers,
> Matthew Brush
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20151025/4c196db7/attachment.html>


More information about the Devel mailing list