mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
15 lines
285 B
Plaintext
15 lines
285 B
Plaintext
module temp_mem;
|
|
|
|
fn void test_realloc() @test
|
|
{
|
|
void* mem = tmalloc(10);
|
|
for (int i = 1; i < 4096 * 32 * 16 * 2; i <<= 1)
|
|
{
|
|
mem = mem::trealloc(mem, i);
|
|
}
|
|
for (int i = 4096 * 32 * 16 * 2; i > 2; i >>= 1)
|
|
{
|
|
mem = mem::trealloc(mem, i);
|
|
(void)tmalloc(1235);
|
|
}
|
|
} |