OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [boehm-gc/] [testsuite/] [boehm-gc.c/] [middle.c] - Blame information for rev 721

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 721 jeremybenn
/*
2
 * Test at the boundary between small and large objects.
3
 * Inspired by a test case from Zoltan Varga.
4
 */
5
#include <gc.h>
6
#include <stdio.h>
7
 
8
int main ()
9
{
10
        int i;
11
 
12
        GC_all_interior_pointers = 0;
13
 
14
        for (i = 0; i < 20000; ++i) {
15
                GC_malloc_atomic (4096);
16
                GC_malloc (4096);
17
        }
18
        for (i = 0; i < 20000; ++i) {
19
                GC_malloc_atomic (2048);
20
                GC_malloc (2048);
21
        }
22
        printf("Final heap size is %ld\n", GC_get_heap_size());
23
        return 0;
24
}
25
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.