os/ossrv/glib/tsrc/BC/src/mem_profile_test.c
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
sl@0
     3
*
sl@0
     4
* This library is free software; you can redistribute it and/or
sl@0
     5
* modify it under the terms of the GNU Lesser General Public
sl@0
     6
* License as published by the Free Software Foundation; either
sl@0
     7
* version 2 of the License, or (at your option) any later version.
sl@0
     8
*
sl@0
     9
* This library is distributed in the hope that it will be useful,
sl@0
    10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
sl@0
    11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
sl@0
    12
* Lesser General Public License for more details.
sl@0
    13
*
sl@0
    14
* You should have received a copy of the GNU Lesser General Public
sl@0
    15
* License along with this library; if not, write to the
sl@0
    16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
sl@0
    17
* Boston, MA 02111-1307, USA.
sl@0
    18
*
sl@0
    19
* Description:
sl@0
    20
*
sl@0
    21
*/
sl@0
    22
sl@0
    23
sl@0
    24
sl@0
    25
// This is a manual test case. Successfull execution of this test case will print 
sl@0
    26
// memory profile on stdout.
sl@0
    27
sl@0
    28
#undef G_DISABLE_ASSERT
sl@0
    29
#undef G_LOG_DOMAIN
sl@0
    30
sl@0
    31
#include <stdio.h>
sl@0
    32
#include <glib.h>
sl@0
    33
#include <glib_global.h>
sl@0
    34
sl@0
    35
sl@0
    36
int main()
sl@0
    37
{
sl@0
    38
	int *a,*b;
sl@0
    39
sl@0
    40
	#ifdef SYMBIAN
sl@0
    41
	
sl@0
    42
  	#endif
sl@0
    43
  	
sl@0
    44
  	g_mem_set_vtable(glib_mem_profiler_table);
sl@0
    45
  	a = g_malloc(512);
sl@0
    46
  	b = g_malloc(1024);
sl@0
    47
    	
sl@0
    48
  	g_mem_profile();
sl@0
    49
}