1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
emacs/mps/test/function/70.c
Gareth Rees ceaca84a7f Avoid using deprecated function mps_tramp.
Use mps_root_create_thread in preference to mps_root_create_reg.
New test harness run_test passes pointer to cold end of stack, since this is needed by many tests.

Copied from Perforce
 Change: 195917
2019-01-09 16:17:17 +00:00

39 lines
724 B
C

/*
TEST_HEADER
id = $Id$
summary = create an arena and see how much mem is taken
language = c
link = testlib.o
END_HEADER
*/
#include "testlib.h"
static void test(void *stack_pointer)
{
mps_arena_t arena;
comment("Entered trampoline");
mmqa_pause(10);
cdie(mps_arena_create(&arena, mps_arena_class_vm(), mmqaArenaSIZE), "create arena");
comment("Created arena");
report("committed", "%ul", mps_arena_committed(arena));
report("reserved", "%ul", mps_arena_reserved(arena));
mmqa_pause(10);
mps_arena_destroy(arena);
comment("Destroyed arena");
mmqa_pause(10);
}
int main(void)
{
comment("Started");
mmqa_pause(10);
run_test(test);
comment("Left trampoline");
mmqa_pause(10);
pass();
return 0;
}