Changeset 340


Ignore:
Timestamp:
May 23, 2008, 11:19:32 PM (17 years ago)
Author:
cinc
Message:

Use different sizes when allocating memory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/c/test-gc.c

    r339 r340  
    6060#include "nomgc.h"
    6161
    62 #define MEMSIZE   1700
    63 #define NUMALLOCS 25000
     62#define MEMSIZE   17
     63#define NUMALLOCS 25000*2
    6464
    6565/**
     
    6969{
    7070  int a;
    71 
     71 
    7272  /* GSlice isn't GC aware */
    7373  g_slice_set_config(G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
     
    9090      gpointer gp;
    9191
    92       gp=g_malloc(MEMSIZE);
     92      gp=g_malloc(MEMSIZE*a);
    9393      g_assert(gp);     
    9494    }
    95     g_message("Allocated %d chunks of %d bytes of memory -> %d bytes", NUMALLOCS, MEMSIZE, NUMALLOCS*MEMSIZE);
     95    g_message("Allocated %d chunks of %d bytes of memory -> %d bytes", NUMALLOCS, MEMSIZE*a, NUMALLOCS*MEMSIZE*a);
    9696  }
    97 
     97 
    9898  g_message("               --> OK");
    9999 
Note: See TracChangeset for help on using the changeset viewer.