[maemo-developers] C - Hildon - Memory usage

From: Allan Bezerra allan.bezerra at gmail.com
Date: Mon Feb 11 16:58:46 EET 2008
Hi David,

>  VmSize:       92284 kB
This is Virtual Memory. Are you using threads? If yes, you can reduce
virtual memory allocated for each thread in order to reduce virtual memory
usage.

-- Allan Bezerra
INDT-Nokia-Manaus

On Feb 9, 2008 10:43 AM, David Hautbois <david.hautbois at free.fr> wrote:

> Hi
>
> I'm a newbie with C programming and make many errors with memory
> management (memory allocation, freeing memory...).
> So, I'm aware about the memory used by my application.
> I play with "top" and see my application uses 100MB !!!
> I check my code and see the problem is here :
>
> ********************************************************
> void kml_browse_btn_clicked ( GtkWidget * widget, gpointer data) {
>
>    GtkWidget * HildonDialog;
>    HildonDialog = hildon_file_chooser_dialog_new(GTK_WINDOW(pKmlBoite),
> GTK_FILE_CHOOSER_ACTION_SAVE);
>    getchar();
>
>    if (gtk_dialog_run (GTK_DIALOG (HildonDialog)) == GTK_RESPONSE_OK) {
>        gchar *chooser_filename = gtk_file_chooser_get_filename
> (GTK_FILE_CHOOSER (HildonDialog));
>        gtk_entry_set_text( GTK_ENTRY(LocaldirEntry), chooser_filename);
>    }
>    gtk_widget_destroy (HildonDialog);
>    (void) widget;
>    (void) data;
> }
> ******************************************************************
>
> Before "HildonDialog = hildon......."
> My application uses 36Mb.
> After (getchar), it uses 100Mb !!!:
>   VmPeak:       92288 kB
>   VmSize:       92284 kB
>   VmLck:           0 kB
>   VmHWM:       12736 kB
>   VmRSS:       12736 kB
>   VmData:       67484 kB
>   VmStk:          84 kB
>   VmExe:          40 kB
>   VmLib:       13504 kB
>   VmPTE:          56 kB
>
>
> When, I validate the dialog windows, "gtk_widget_destroy" does not free
> the memory.
>
> The application always uses 100Mb.
>
> I'm a newbie, but I think there is a problem....
> Some help is needed.
>
> Thanks.
>
> David.
>
> --
> Web site : http://david.hautbois.free.fr
> Tablet users map : http://david.hautbois.free.fr/maps/index.php
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20080211/bc618b80/attachment.htm 
More information about the maemo-developers mailing list